Documentation ¶
Index ¶
- func NewKeyID(pub *ecdsa.PublicKey) []byte
- func ReadHexFile(target string) ([]byte, error)
- func WriteHexFile(key []byte, target string) error
- type Config
- type Issuer
- func (is *Issuer) GetCurrentKey() *KeySet
- func (is *Issuer) HandleCreateCredential(ctx *gin.Context)
- func (is *Issuer) HandleGet(ctx *gin.Context)
- func (is *Issuer) Issue(firstName string, lastName string, dob time.Time, ...) []byte
- func (is *Issuer) MarshalSubmitKeysRequest(set *KeySet) ([]byte, error)
- func (is *Issuer) Save() error
- func (is *Issuer) ServiceLiveness(ctx *gin.Context)
- func (is *Issuer) SubmitNewKeys(set *KeySet) error
- type KeySet
- type ProcedureType
- type SubmitKeysRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadHexFile ¶
func WriteHexFile ¶
Types ¶
type Config ¶
type Config struct { CredentialTypeConfig string `mapstructure:"credentialType"` UserID string `mapstructure:"userID"` Password string `mapstructure:"password"` OTPSecret string `mapstructure:"otpSecret"` Debug bool `mapstructure:"debug"` DebugNoKeySubmit bool `mapstructure:"debugnokeysubmit"` // SaveFilePath sets the path of the file that should be used for the state-save file SaveFilePath string `mapstructure:"saveFilePath"` // WriteDebugFiles sets to write debug files of the certs and keys. WriteDebugFiles bool `mapstructure:"writeDebugFiles"` // DebugFilePrefix is the prefix used to name the debug files. DebugFilePrefix string `mapstructure:"debugFilePrefix"` // DebugFilePath is the path used to store the debug files. DebugFilePath string `mapstructure:"debugFilePath"` // CAURL is the url where the certificate authority can be found. This is also called the key management server. CAURL string `mapstructure:"caURL"` // OrgName is the organisation name of the organisation to use for certificate generation OrgName string `mapstructure:"orgName"` EncryptionKeyName string `mapstructure:"encryptionKeyName"` // KeyRotationTime configures the approximate time during the day that new keys should be submitted in HH:mm KeyRotationTime string `mapstructure:"keyRotationTime"` // KeyUpdatePollPeriod configures how often in minutes this service should check // to see if new keys should be used or created. KeyUpdatePollPeriod int64 `mapstructcure:"keyUpdatePollPeriod"` }
type Issuer ¶
type Issuer struct { CredentialType credential.Type `cbor:"-"` LastUpdated time.Time Keys []*KeySet Config `cbor:"-"` KeyRotationPeriod time.Duration Logger *zap.Logger `cbor:"-"` // contains filtered or unexported fields }
func (*Issuer) GetCurrentKey ¶
func (*Issuer) HandleCreateCredential ¶
func (*Issuer) Issue ¶
func (is *Issuer) Issue( firstName string, lastName string, dob time.Time, procedures []credential.Procedure, result bool, orgName string, ) []byte
Issue generates a new BärCODE as a bitmap and returns it DoB will contain only date information with everything else being 0'd (including TZ, so that it uses UTC) This could potentially take a credential object containing the same fields.
func (*Issuer) MarshalSubmitKeysRequest ¶
func (*Issuer) ServiceLiveness ¶ added in v0.4.0
ServiceLiveness checks the status of the service and returns a 200 if the service is in a good state, and a 500 if not.
func (*Issuer) SubmitNewKeys ¶
type KeySet ¶
type ProcedureType ¶
type ProcedureType int
type SubmitKeysRequest ¶
type SubmitKeysRequest struct { CredType credential.Type AesKey cbor.RawMessage ECCKey cbor.RawMessage // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.