Documentation
¶
Index ¶
- Constants
- type CAType
- type Cert
- type CertContent
- type CreateCARequestPayload
- type GetCasResponse
- type ImportCARequestPayload
- type IssuedCertsResponse
- type KeyType
- type OrderOptions
- type PaginationOptions
- type PrivateKey
- type PrivateKeyMetadata
- type PrivateKeyMetadataWithStregth
- type QueryParameters
- type SignPayload
- type SignResponse
- type Stats
- type Subject
Constants ¶
View Source
const ( StatusValid = "issued" StatusRevoked = "revoked" StatusExpired = "expired" )
View Source
const DefaultQueryParam = "{1,50}"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cert ¶
type Cert struct { // The status of the CA // required: true // example: issued | expired Status string `json:"status,omitempty"` // The serial number of the CA // required: true // example: 7e:36:13:a5:31:9f:4a:76:10:64:2e:9b:0a:11:07:b7:e6:3e:cf:94 SerialNumber string `json:"serial_number,omitempty"` // The name/alias of the CA // required: true // example: Lamassu-CA Name string `json:"name,omitempty"` KeyMetadata PrivateKeyMetadataWithStregth `json:"key_metadata"` Subject Subject `json:"subject"` CertContent CertContent `json:"certificate"` // Expiration period of the new emmited CA // required: true // example: 262800h CaTTL int `json:"ca_ttl,omitempty"` EnrollerTTL int `json:"enroller_ttl,omitempty"` ValidFrom string `json:"valid_from"` ValidTo string `json:"valid_to"` RevocationTimestamp int64 `json:"revocation_timestamp,omitempty"` }
type CertContent ¶
type CreateCARequestPayload ¶
type CreateCARequestPayload struct { KeyMetadata PrivateKeyMetadata `json:"key_metadata" validate:"required"` Subject Subject `json:"subject"` CaTTL int `json:"ca_ttl" validate:"required"` EnrollerTTL int `json:"enroller_ttl" validate:"gt=0"` }
type GetCasResponse ¶
type ImportCARequestPayload ¶
type IssuedCertsResponse ¶
type OrderOptions ¶
type PaginationOptions ¶
type PrivateKey ¶
type PrivateKey struct { Key interface{} KeyType KeyType }
func (*PrivateKey) GetPEMString ¶
func (pk *PrivateKey) GetPEMString() (string, error)
type PrivateKeyMetadata ¶
type PrivateKeyMetadataWithStregth ¶
type PrivateKeyMetadataWithStregth struct { // Algorithm used to create CA key // required: true // example: RSA KeyType string `json:"type" validate:"oneof='RSA' 'EC'"` // Length used to create CA key // required: true // example: 4096 KeyBits int `json:"bits"` // Strength of the key used to the create CA // required: true // example: low KeyStrength string `json:"strength"` }
type QueryParameters ¶
type QueryParameters struct { Filter string `json:"filter"` Order OrderOptions `json:"order_options"` Pagination PaginationOptions `json:"pagination_options"` }
type SignPayload ¶
type SignResponse ¶
type Subject ¶
type Subject struct { // Common name of the CA certificate // required: true // example: Lamassu-Root-CA1-RSA4096 CommonName string `json:"common_name" validate:"required"` // Organization of the CA certificate // required: true // example: Lamassu IoT Organization string `json:"organization"` // Organization Unit of the CA certificate // required: true // example: Lamassu IoT department 1 OrganizationUnit string `json:"organization_unit"` // Country Name of the CA certificate // required: true // example: ES Country string `json:"country"` // State of the CA certificate // required: true // example: Guipuzcoa State string `json:"state"` // Locality of the CA certificate // required: true // example: Arrasate Locality string `json:"locality"` }
Click to show internal directories.
Click to hide internal directories.