Files
certmanager/internal/descriptor/descriptor.go
Олег Бородин 1cdbd2b034 certmanager updates
2024-08-10 10:19:56 +02:00

48 lines
2.1 KiB
Go

package descriptor
const (
OperationAddGrant = "addGrant"
OperationDeleteGrant = "deleteGrant"
OperationCreateIssuerPair = "createIssuerPair"
OperationRevokeIssuerPair = "revokeIssuerPair"
OperationCreateServicePair = "createSericePair"
OperationRevokeServicePair = "revokeServicePair"
OperationGetServicePair = "getServicePair"
)
type Issuer struct {
ID int64 `json:"id" yaml:"id" db:"id"`
Name string `json:"name" yaml:"name" db:"name"`
SignerID int64 `json:"signerId" yaml:"signerId" db:"signer_id"`
SignerName string `json:"signerName" yaml:"signerName" db:"signer_name"`
Cert string `json:"cert" yaml:"cert" db:"cert"`
Key string `json:"key" yaml:"key" db:"key"`
Revoked bool `json:"revoked" yaml:"revoked" db:"revoked"`
}
type Service struct {
ID int64 `json:"id" yaml:"id" db:"id"`
IssuerID int64 `json:"issuerId" yaml:"issuerId" db:"issuer_id"`
IssuerName string `json:"issuerName" yaml:"issuerName" db:"issuer_name"`
Name string `json:"name" yaml:"name" db:"name"`
Cert string `json:"cert" yaml:"cert" db:"cert"`
Key string `json:"key" yaml:"key" db:"key"`
Revoked bool `json:"revoked" yaml:"revoked" db:"revoked"`
}
type Account struct {
ID int64 `json:"id" yaml:"id" db:"id"`
Username string `json:"username" yaml:"username" db:"username"`
Password string `json:"password" yaml:"password" db:"password"`
Disabled bool `json:"disabled" yaml:"disabled" db:"disabled"`
CreatedAt string `json:"createdAt" yaml:"createdAt" db:"created_at"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt" db:"updated_at"`
}
type Grant struct {
ID int64 `json:"id" yaml:"id" db:"id"`
AccountID int64 `json:"accountID" yaml:"accountID" db:"account_id"`
Operation string `json:"operation" yaml:"operation" db:"operation"`
SubjectID int64 `json:"subjectID" yaml:"subjectID" db:"subject_id"`
}