Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKey ¶
type AccessKey struct { ID string `json:"id" sql:"type:uuid;primary_key;default:uuid_generate_v4()"` Scope string `json:"scope" gorm:"type:varchar(24)"` ScopeId string `json:"scopeId" gorm:"type:varchar(128)"` AccessKey string `json:"accessKey" gorm:"size:24;unique;comment:'Access Key ID'"` SecretKey string `json:"secretKey" gorm:"size:32;unique;comment:'Secret Key'"` Status pb.StatusEnum_Status `json:"status" gorm:"comment:'status of access key'"` SubjectType pb.SubjectTypeEnum_SubjectType `json:"subjectType" gorm:"comment:'authentication subject type. eg: organization, micro_service, system'"` Subject string `json:"subject" gorm:"comment:'authentication subject identifier. eg: id, name or something'"` Description string `json:"description" gorm:"comment:'description'"` CreatedAt time.Time `json:"createdAt" gorm:"comment:'created time'"` UpdatedAt time.Time `json:"updatedAt"` }
store secret key pair
type Dao ¶
type Dao interface { QueryAccessKey(ctx context.Context, req *pb.QueryAccessKeysRequest) ([]AccessKey, int64, error) CreateAccessKey(ctx context.Context, req *pb.CreateAccessKeyRequest) (*AccessKey, error) GetAccessKey(ctx context.Context, req *pb.GetAccessKeyRequest) (*AccessKey, error) UpdateAccessKey(ctx context.Context, req *pb.UpdateAccessKeyRequest) error DeleteAccessKey(ctx context.Context, req *pb.DeleteAccessKeyRequest) error }
Click to show internal directories.
Click to hide internal directories.