Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TableNameGenerator ¶
Types ¶
type KeyModel ¶
type KeyModel struct {
PrimaryModel
ExternalId *string `json:"external_id" gorm:"uniqueIndex"`
PrivateKey string `json:"private_key"`
PublicKey string `json:"public_key"`
Kid string `json:"kid"`
JWK datatypes.JSON `json:"jwk" gorm:"type:jsonb"`
ShouldRotate *bool `json:"should_rotate" gorm:"default:false"`
RotateCron *string `json:"rotate_cron"`
ExpiresAt *time.Time `json:"expires_at" gorm:"index"`
TimesModel
}
func (*KeyModel) GenerateJWK ¶
func (*KeyModel) GenerateKeys ¶
func (*KeyModel) NextExpirationDate ¶
type KeyRotatedModel ¶
type KeyRotatedModel struct {
PrimaryModel
KeyId string `json:"key" gorm:"index"`
PrivateKey string `json:"private_key" gorm:"uniqueIndex"`
PublicKey string `json:"public_key" gorm:"uniqueIndex"`
Kid string `json:"kid"`
JWK datatypes.JSON `json:"jwk" gorm:"type:jsonb"`
ExpiresAt *time.Time `json:"expires_at" gorm:"index"`
TimesModel
}
func (*KeyRotatedModel) JWKMap ¶
func (k *KeyRotatedModel) JWKMap() map[string]interface{}
func (*KeyRotatedModel) TableName ¶
func (*KeyRotatedModel) TableName() string
type PrimaryModel ¶
type PrimaryModel struct {
ID string `gorm:"primaryKey; type:text;" json:"id" swaggertype:"string"`
}
func (*PrimaryModel) BeforeCreate ¶
func (main *PrimaryModel) BeforeCreate(db *gorm.DB) error
func (*PrimaryModel) BeforeSave ¶
func (main *PrimaryModel) BeforeSave(db *gorm.DB) error
type TimesModel ¶
Click to show internal directories.
Click to hide internal directories.