Skip to content

Commit

Permalink
Merge pull request #35 from ZenkieBear/main
Browse files Browse the repository at this point in the history
fix: Updated the module name
  • Loading branch information
necheffa authored Apr 6, 2024
2 parents 88f8d10 + e325e94 commit 9bbeeb3
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 235 deletions.
6 changes: 3 additions & 3 deletions ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"path/filepath"
"time"

storage "github.com/kairoaraujo/goca/_storage"
"github.com/kairoaraujo/goca/cert"
"github.com/kairoaraujo/goca/key"
storage "github.com/kairoaraujo/goca/v2/_storage"
"github.com/kairoaraujo/goca/v2/cert"
"github.com/kairoaraujo/goca/v2/key"
)

// Const
Expand Down
4 changes: 2 additions & 2 deletions cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import (
"path/filepath"
"time"

storage "github.com/kairoaraujo/goca/_storage"
"github.com/kairoaraujo/goca/key"
storage "github.com/kairoaraujo/goca/v2/_storage"
"github.com/kairoaraujo/goca/v2/key"
)

const (
Expand Down
85 changes: 4 additions & 81 deletions docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -428,67 +427,6 @@ const docTemplate = `{
}
}
},
"goca.Identity": {
"type": "object",
"properties": {
"country": {
"description": "Country (two letters)",
"type": "string",
"example": "NL"
},
"dns_names": {
"description": "DNS Names list",
"type": "array",
"items": {
"type": "string"
},
"example": [
"ca.example.com",
"root-ca.example.com"
]
},
"email": {
"description": "Email Address",
"type": "string",
"example": "sec@company.com"
},
"intermediate": {
"description": "Intermendiate Certificate Authority (default is false)",
"type": "boolean",
"example": false
},
"key_size": {
"description": "Key Bit Size (defaul: 2048)",
"type": "integer",
"example": 2048
},
"locality": {
"description": "Locality name",
"type": "string",
"example": "Noord-Brabant"
},
"organization": {
"description": "Organization name",
"type": "string",
"example": "Company"
},
"organization_unit": {
"description": "Organizational Unit name",
"type": "string",
"example": "Security Management"
},
"province": {
"description": "Province name",
"type": "string",
"example": "Veldhoven"
},
"valid": {
"description": "Minimum 1 day, maximum 825 days -- Default: 397",
"type": "integer",
"example": 365
}
}
},
"models.CABody": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -589,24 +527,7 @@ const docTemplate = `{
}
},
"models.Payload": {
"type": "object",
"required": [
"common_name",
"identity"
],
"properties": {
"common_name": {
"type": "string",
"example": "root-ca"
},
"identity": {
"$ref": "#/definitions/goca.Identity"
},
"parent_common_name": {
"type": "string",
"example": "root-ca"
}
}
"type": "object"
},
"models.ResponseCA": {
"type": "object",
Expand Down Expand Up @@ -667,6 +588,8 @@ var SwaggerInfo = &swag.Spec{
Description: "GoCA Certificate Authority Management API.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
Expand Down
80 changes: 1 addition & 79 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,67 +422,6 @@
}
}
},
"goca.Identity": {
"type": "object",
"properties": {
"country": {
"description": "Country (two letters)",
"type": "string",
"example": "NL"
},
"dns_names": {
"description": "DNS Names list",
"type": "array",
"items": {
"type": "string"
},
"example": [
"ca.example.com",
"root-ca.example.com"
]
},
"email": {
"description": "Email Address",
"type": "string",
"example": "sec@company.com"
},
"intermediate": {
"description": "Intermendiate Certificate Authority (default is false)",
"type": "boolean",
"example": false
},
"key_size": {
"description": "Key Bit Size (defaul: 2048)",
"type": "integer",
"example": 2048
},
"locality": {
"description": "Locality name",
"type": "string",
"example": "Noord-Brabant"
},
"organization": {
"description": "Organization name",
"type": "string",
"example": "Company"
},
"organization_unit": {
"description": "Organizational Unit name",
"type": "string",
"example": "Security Management"
},
"province": {
"description": "Province name",
"type": "string",
"example": "Veldhoven"
},
"valid": {
"description": "Minimum 1 day, maximum 825 days -- Default: 397",
"type": "integer",
"example": 365
}
}
},
"models.CABody": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -583,24 +522,7 @@
}
},
"models.Payload": {
"type": "object",
"required": [
"common_name",
"identity"
],
"properties": {
"common_name": {
"type": "string",
"example": "root-ca"
},
"identity": {
"$ref": "#/definitions/goca.Identity"
},
"parent_common_name": {
"type": "string",
"example": "root-ca"
}
}
"type": "object"
},
"models.ResponseCA": {
"type": "object",
Expand Down
59 changes: 0 additions & 59 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,53 +57,6 @@ definitions:
-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----
type: string
type: object
goca.Identity:
properties:
country:
description: Country (two letters)
example: NL
type: string
dns_names:
description: DNS Names list
example:
- ca.example.com
- root-ca.example.com
items:
type: string
type: array
email:
description: Email Address
example: sec@company.com
type: string
intermediate:
description: Intermendiate Certificate Authority (default is false)
example: false
type: boolean
key_size:
description: 'Key Bit Size (defaul: 2048)'
example: 2048
type: integer
locality:
description: Locality name
example: Noord-Brabant
type: string
organization:
description: Organization name
example: Company
type: string
organization_unit:
description: Organizational Unit name
example: Security Management
type: string
province:
description: Province name
example: Veldhoven
type: string
valid:
description: 'Minimum 1 day, maximum 825 days -- Default: 397'
example: 365
type: integer
type: object
models.CABody:
properties:
certificates:
Expand Down Expand Up @@ -175,18 +128,6 @@ definitions:
type: string
type: object
models.Payload:
properties:
common_name:
example: root-ca
type: string
identity:
$ref: '#/definitions/goca.Identity'
parent_common_name:
example: root-ca
type: string
required:
- common_name
- identity
type: object
models.ResponseCA:
properties:
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/kairoaraujo/goca"
"github.com/kairoaraujo/goca/v2"
)

func Example_minimal() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kairoaraujo/goca
module github.com/kairoaraujo/goca/v2

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion goca.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"crypto/rsa"
"crypto/x509"

storage "github.com/kairoaraujo/goca/_storage"
storage "github.com/kairoaraujo/goca/v2/_storage"
)

// CA represents the basic CA data
Expand Down
2 changes: 1 addition & 1 deletion key/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"crypto/x509"
"encoding/pem"

storage "github.com/kairoaraujo/goca/_storage"
storage "github.com/kairoaraujo/goca/v2/_storage"
)

// KeysData represents the RSA keys with Private Key (Key) and Public Key (Public Key).
Expand Down
8 changes: 4 additions & 4 deletions rest-api/controllers/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (

"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/kairoaraujo/goca"
storage "github.com/kairoaraujo/goca/_storage"
"github.com/kairoaraujo/goca/cert"
"github.com/kairoaraujo/goca/rest-api/models"
"github.com/kairoaraujo/goca/v2"
storage "github.com/kairoaraujo/goca/v2/_storage"
"github.com/kairoaraujo/goca/v2/cert"
"github.com/kairoaraujo/goca/v2/rest-api/models"
)

func getCAData(ca goca.CA) (body models.CABody) {
Expand Down
4 changes: 2 additions & 2 deletions rest-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"

_ "github.com/kairoaraujo/goca/docs"
"github.com/kairoaraujo/goca/rest-api/controllers"
_ "github.com/kairoaraujo/goca/v2/docs"
"github.com/kairoaraujo/goca/v2/rest-api/controllers"
)

// @title GoCA API
Expand Down
2 changes: 1 addition & 1 deletion rest-api/models/models.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
"github.com/kairoaraujo/goca"
"github.com/kairoaraujo/goca/v2"
)

type ResponseError struct {
Expand Down

0 comments on commit 9bbeeb3

Please sign in to comment.