models

package
v0.0.0-...-c03dbfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cert

type Cert struct {
	ID        *bson.ObjectId `json:"id" bson:"_id" readOnly:"true" optional:"true" description:"Certificate identifier"`
	PRN       string         `json:"prn" readOnly:"true" optional:"true" description:"Register PRN"`
	Cert      string         `json:"crt" bson:"crt" description:"cert content"`
	Type      CertType       `json:"type" bson:"type" description:"type of certificate"`
	DeletedAt *time.Time     `json:"-" bson:"deleted_at" optional:"true"`
	UpdatedAt *time.Time     `json:"updated_at" bson:"updated_at" optional:"true"`
	CreatedAt *time.Time     `json:"created_at" bson:"created_at"`
}

Cert save accredited certs

type CertType

type CertType string

CertType type of certificate

const (
	// CertsCollectionName mongo collection name
	CertsCollectionName = "certs"

	// AIKType certificate type IAK
	AIKType CertType = "AIK"

	// LDevIDType certificate type
	LDevIDType CertType = "LDEVID"
)

type EnvDefaults

type EnvDefaults struct {
	// ServerHost Go server host and port
	ServerHost string

	// Pantahub CA
	CaCert string

	// AcaCertificate ACA certificate in der format and base64 encoded
	AcaCertificate string

	// AcaPrivateKey ACA private key in pem format and base64 encoded
	AcaPrivateKey string

	// APIHost server host
	APIHost string

	// APIScheme server scheme
	APIScheme string

	// ServiceName service name
	ServiceName string

	// TrustedRoots array of trusted root certificates
	TrustedRoots []string

	// TrustedRootsBundle array of trusted root certificates
	TrustedRootsBundle string

	// ProxyTLSUnlockAuthToken bearer token
	ProxyTLSUnlockAuthToken string

	// BaseApiHost base api host and port
	BaseAPIHost string

	// BaseAPIScheme api scheme could be http or https
	BaseAPIScheme string
}

EnvDefaults : EnvDefaults Structure to hold Env default Variable values

type PhCertExtensions

type PhCertExtensions struct {
	AIKName       asn1.ObjectIdentifier
	OwnerPrnOID   asn1.ObjectIdentifier
	OwnernameSig  asn1.ObjectIdentifier
	TokenID       asn1.ObjectIdentifier
	CertifyAttest asn1.ObjectIdentifier
	CertifySig    asn1.ObjectIdentifier
	QuoteAttest   asn1.ObjectIdentifier
	QuoteSig      asn1.ObjectIdentifier
	QuotePcrList  asn1.ObjectIdentifier
	DevicePRN     asn1.ObjectIdentifier
}

PhCertExtensions all the indentifiers for pantahub extensions on a certificate struct

type RestError

type RestError struct {
	Message string `json:"message" description:"Error message"`
	Code    string `json:"code" description:"internal server error code"`
}

RestError structure for all error messages as json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL