Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAPIKey ¶ added in v0.16.0
type CreateAPIKey struct {
ID string `json:"id" bson:"_id"`
Name string `json:"name" bson:"name"`
UserID string `json:"user_id" bson:"user_id"`
TenantID string `json:"tenant_id" bson:"tenant_id"`
Role authorizer.Role `json:"role" bson:"role" validate:"required,oneof=administrator operator observer"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
ExpiresIn int64 `json:"expires_in" bson:"expires_in"`
}
func CreateAPIKeyFromModel ¶ added in v0.16.0
func CreateAPIKeyFromModel(m *models.APIKey) *CreateAPIKey
type PublicKeyCreate ¶
type PublicKeyCreate struct {
Data []byte `json:"data"`
Filter PublicKeyFilter `json:"filter"`
Name string `json:"name"`
Username string `json:"username"`
TenantID string `json:"tenant_id"`
Fingerprint string `json:"fingerprint"`
}
PublicKeyCreate is the structure to represent the request data for create public key endpoint.
type PublicKeyFilter ¶
type PublicKeyFilter struct {
Hostname string `json:"hostname,omitempty" validate:"required_without=Tags,excluded_with=Tags,regexp"`
// FIXME: add validation for tags when it has at least one item.
//
// If used `min=1` to do that validation, when tags is empty, its zero value, and only hostname is provided,
// it throws a error even with `required_without` and `excluded_with`.
Tags []string `` /* 142-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.