Documentation
¶
Index ¶
Constants ¶
const ( // RolePermissionPermissionRead captures enum value "read" RolePermissionPermissionRead string = "read" // RolePermissionPermissionWrite captures enum value "write" RolePermissionPermissionWrite string = "write" // RolePermissionPermissionDelete captures enum value "delete" RolePermissionPermissionDelete string = "delete" // RolePermissionPermissionDeploy captures enum value "deploy" RolePermissionPermissionDeploy string = "deploy" )
const ( // ServiceInfoExposeTypeIncluster captures enum value "incluster" ServiceInfoExposeTypeIncluster string = "incluster" // ServiceInfoExposeTypeNodeport captures enum value "nodeport" ServiceInfoExposeTypeNodeport string = "nodeport" // ServiceInfoExposeTypeNone captures enum value "none" ServiceInfoExposeTypeNone string = "none" )
const ( // TokenTypeSession captures enum value "session" TokenTypeSession string = "session" // TokenTypePrivate captures enum value "private" TokenTypePrivate string = "private" // TokenTypePublic captures enum value "public" TokenTypePublic string = "public" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthInfo ¶
type AuthInfo struct {
// token
Token *Token `json:"token,omitempty"`
// user's info
UserInfo *UserInfo `json:"user_info,omitempty"`
}
AuthInfo auth info
swagger:model AuthInfo
func (*AuthInfo) ContextValidate ¶
ContextValidate validate this auth info based on the context it is used
func (*AuthInfo) MarshalBinary ¶
MarshalBinary interface implementation
func (*AuthInfo) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type EnvironmentVariable ¶
type EnvironmentVariable struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// service id
// Example: 1
ServiceID int64 `json:"service_id,omitempty" db:"service_id,type=INTEGER"`
// environment variable name
// Example: foobar
Name string `json:"name,omitempty" db:"name,type=VARCHAR(255)"`
// environment variable value
// Example: foobar
Value string `json:"value,omitempty" db:"value,type=VARCHAR(255)"`
}
EnvironmentVariable Environment Variable for service deploy
swagger:model EnvironmentVariable
func (*EnvironmentVariable) ContextValidate ¶
ContextValidate validates this environment variable based on context it is used
func (*EnvironmentVariable) MarshalBinary ¶
func (m *EnvironmentVariable) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EnvironmentVariable) UnmarshalBinary ¶
func (m *EnvironmentVariable) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Error ¶
type Error struct {
// 错误信息
// Example: error message
Message string `json:"message,omitempty"`
}
Error error
swagger:model Error
func (*Error) ContextValidate ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type GetTicketReq ¶
type GetTicketReq struct {
// pod name
// Example: foobar-9zqb2
PodName string `json:"pod_name,omitempty"`
// project id
// Example: 1
ProjectID int64 `json:"project_id,omitempty"`
}
GetTicketReq SSH Pod Ticket Object
swagger:model GetTicketReq
func (*GetTicketReq) ContextValidate ¶
ContextValidate validates this get ticket req based on context it is used
func (*GetTicketReq) MarshalBinary ¶
func (m *GetTicketReq) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetTicketReq) UnmarshalBinary ¶
func (m *GetTicketReq) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PodInfo ¶
type PodInfo struct {
// age of pod
// Example: 1m
Age string `json:"age,omitempty"`
// ip of pod
// Example: 10.244.2.61
IP string `json:"ip,omitempty"`
// unique name for pod
// Example: foobar-9zqb2
Name string `json:"name,omitempty"`
// node name
// Example: minikube-m03
Node string `json:"node,omitempty"`
// restart time
// Example: 0
Restarts int64 `json:"restarts,omitempty"`
// pod status
// Example: Running
Status string `json:"status,omitempty"`
}
PodInfo Pod Object
swagger:model PodInfo
func (*PodInfo) ContextValidate ¶
ContextValidate validates this pod info based on context it is used
func (*PodInfo) MarshalBinary ¶
MarshalBinary interface implementation
func (*PodInfo) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ProjectInfo ¶
type ProjectInfo struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// owner_id
// Example: 1
OwnerID int64 `json:"owner_id,omitempty" db:"owner_id,type=INTEGER"`
// project name
// Example: foobar
Name string `json:"name,omitempty" db:"name,type=VARCHAR(255)"`
// project description
// Example: foobar project
Description string `json:"description,omitempty" db:"description,type=VARCHAR(255)"`
// create at, unix timestamp
// Example: 1528894200
CreateAt int64 `json:"create_at,omitempty" db:"create_at,type=INTEGER"`
// update at, unix timestamp
// Example: 1528894200
UpdateAt int64 `json:"update_at,omitempty" db:"update_at,type=INTEGER"`
}
ProjectInfo Project Object
swagger:model ProjectInfo
func (*ProjectInfo) ContextValidate ¶
ContextValidate validates this project info based on context it is used
func (*ProjectInfo) MarshalBinary ¶
func (m *ProjectInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ProjectInfo) UnmarshalBinary ¶
func (m *ProjectInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ProjectRole ¶
type ProjectRole struct {
// project_id
// Example: 1
ProjectID int64 `json:"project_id,omitempty"`
// roles
Roles []*RoleView `json:"roles"`
}
ProjectRole Project Role Object
swagger:model ProjectRole
func (*ProjectRole) ContextValidate ¶
ContextValidate validate this project role based on the context it is used
func (*ProjectRole) MarshalBinary ¶
func (m *ProjectRole) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ProjectRole) UnmarshalBinary ¶
func (m *ProjectRole) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type RoleInfo ¶
type RoleInfo struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// project id
// Example: 1
ProjectID int64 `json:"project_id,omitempty" db:"project_id,type=INTEGER"`
// role
// Example: admin
Role string `json:"role,omitempty" db:"role,type=VARCHAR(255)"`
}
RoleInfo Authority Role Object
swagger:model RoleInfo
func (*RoleInfo) ContextValidate ¶
ContextValidate validates this role info based on context it is used
func (*RoleInfo) MarshalBinary ¶
MarshalBinary interface implementation
func (*RoleInfo) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type RoleMember ¶
type RoleMember struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// role id
// Example: 1
RoleID int64 `json:"role_id,omitempty" db:"role_id,type=INTEGER"`
// user id
// Example: 1
UserID int64 `json:"user_id,omitempty" db:"user_id,type=INTEGER"`
}
RoleMember Authority Role Member Object
swagger:model RoleMember
func (*RoleMember) ContextValidate ¶
ContextValidate validates this role member based on context it is used
func (*RoleMember) MarshalBinary ¶
func (m *RoleMember) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RoleMember) UnmarshalBinary ¶
func (m *RoleMember) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type RolePermission ¶
type RolePermission struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// permission
// Enum: [read write delete deploy]
Permission string `json:"permission,omitempty" db:"permission,type=VARCHAR(255)"`
// AuthorityRole id
// Example: 1
RoleID int64 `json:"role_id,omitempty" db:"role_id,type=INTEGER"`
}
RolePermission Role Permissions Object
swagger:model RolePermission
func (*RolePermission) ContextValidate ¶
ContextValidate validates this role permission based on context it is used
func (*RolePermission) MarshalBinary ¶
func (m *RolePermission) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RolePermission) UnmarshalBinary ¶
func (m *RolePermission) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type RoleView ¶
type RoleView struct {
// info
Info *RoleInfo `json:"info,omitempty"`
// members
Members []*RoleMember `json:"members"`
// permissions
Permissions []*RolePermission `json:"permissions"`
}
RoleView Authority Role View Object
swagger:model RoleView
func (*RoleView) ContextValidate ¶
ContextValidate validate this role view based on the context it is used
func (*RoleView) MarshalBinary ¶
MarshalBinary interface implementation
func (*RoleView) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type SSHPodTicket ¶
type SSHPodTicket struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// namespace name
// Example: foobar
NamespaceName string `json:"namespace_name,omitempty" db:"namespace_name,type=VARCHAR(255)"`
// pod name
// Example: foobar-9zqb2
PodName string `json:"pod_name,omitempty" db:"pod_name,type=VARCHAR(255)"`
// ticket
// Example: AISBJFCOIZXUF==
Ticket string `json:"ticket,omitempty" db:"ticket,type=VARCHAR(255)"`
// user id
// Example: 1
UserID int64 `json:"user_id,omitempty" db:"user_id,type=INTEGER"`
// create at, unix timestamp
CreateAt int64 `json:"create_at,omitempty" db:"create_at,type=INTEGER"`
}
SSHPodTicket SSH Pod Ticket Object
swagger:model SSHPodTicket
func (*SSHPodTicket) ContextValidate ¶
ContextValidate validates this SSH pod ticket based on context it is used
func (*SSHPodTicket) MarshalBinary ¶
func (m *SSHPodTicket) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SSHPodTicket) UnmarshalBinary ¶
func (m *SSHPodTicket) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ServiceInfo ¶
type ServiceInfo struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// project id
// Example: 1
ProjectID int64 `json:"project_id,omitempty" db:"project_id,type=INTEGER"`
// service name
// Example: foobar
Name string `json:"name,omitempty" db:"name,type=VARCHAR(255)"`
// service description
// Example: foobar service
Description string `json:"description,omitempty" db:"description,type=VARCHAR(255)"`
// service is running or not
// Example: false
Running bool `json:"running,omitempty" db:"running,type=BOOLEAN"`
// version id
// Example: 1
VersionID int64 `json:"version_id,omitempty" db:"version_id,type=INTEGER"`
// number of pod replicas
// Example: 16
Replica int64 `json:"replica,omitempty" db:"replica,type=INTEGER"`
// expose service or not
// Example: service
// Enum: [incluster nodeport none]
ExposeType string `json:"expose_type,omitempty" db:"expose_type,type=VARCHAR(255)"`
// in-cluster expose port
// Example: 80
InClusterPort int64 `json:"in_cluster_port,omitempty" db:"in_cluster_port,type=INTEGER"`
// node-port expose port
// Example: 80
NodePort int64 `json:"node_port,omitempty" db:"node_port,type=INTEGER"`
// create at, unix timestamp
// Example: 1528894200
CreateAt int64 `json:"create_at,omitempty" db:"create_at,type=INTEGER"`
// update at, unix timestamp
// Example: 1528894200
UpdateAt int64 `json:"update_at,omitempty" db:"update_at,type=INTEGER"`
}
ServiceInfo Service Object
swagger:model ServiceInfo
func (*ServiceInfo) ContextValidate ¶
ContextValidate validates this service info based on context it is used
func (*ServiceInfo) MarshalBinary ¶
func (m *ServiceInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ServiceInfo) UnmarshalBinary ¶
func (m *ServiceInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ServiceVersion ¶
type ServiceVersion struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// version name
// Example: foobar
Name string `json:"name,omitempty" db:"name,type=VARCHAR(255)"`
// version description
// Example: foobar version
Description string `json:"description,omitempty" db:"description,type=VARCHAR(255)"`
// image name
// Example: busybox:latest
Image string `json:"image,omitempty" db:"image,type=VARCHAR(255)"`
// container port
// Example: 80
ContainerPort int64 `json:"container_port,omitempty" db:"container_port,type=INTEGER"`
// create at, unix timestamp
// Example: 1528894200
CreateAt int64 `json:"create_at,omitempty" db:"create_at,type=INTEGER"`
// service id
// Example: 1
ServiceID int64 `json:"service_id,omitempty" db:"service_id,type=INTEGER"`
}
ServiceVersion Service Version Object
swagger:model ServiceVersion
func (*ServiceVersion) ContextValidate ¶
ContextValidate validates this service version based on context it is used
func (*ServiceVersion) MarshalBinary ¶
func (m *ServiceVersion) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ServiceVersion) UnmarshalBinary ¶
func (m *ServiceVersion) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Token ¶
type Token struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// token type
// Enum: [session private public]
Type string `json:"type,omitempty" db:"type,type=VARCHAR(20)"`
// user's id
// Example: 1
UserID int64 `json:"user_id,omitempty" db:"user_id,type=INTEGER"`
// token value
// Example: zxicgoiuasie
Value string `json:"value,omitempty" db:"value,type=VARCHAR(255)"`
// create at, unix timestamp
// Example: 1528894200
CreateAt int64 `json:"create_at,omitempty" db:"create_at,type=INTEGER"`
// expired at, unix timestamp
// Example: 1528994200
ExpiredAt int64 `json:"expired_at,omitempty" db:"expired_at,type=INTEGER"`
// create at, unix timestamp
// Example: 1528894200
UpdateAt int64 `json:"update_at,omitempty" db:"update_at,type=INTEGER"`
}
Token Token Object
swagger:model Token
func (*Token) ContextValidate ¶
ContextValidate validates this token based on context it is used
func (*Token) MarshalBinary ¶
MarshalBinary interface implementation
func (*Token) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type UserInfo ¶
type UserInfo struct {
// id
// Example: 1
ID int64 `json:"id,omitempty" db:"id,type=INTEGER,primary,auto_increment"`
// email, unique
// Example: foo@bar.com
Email string `json:"email,omitempty" db:"email,type=VARCHAR(255)"`
// password
// Example: foobar123
Password string `json:"password,omitempty" db:"password,type=VARCHAR(255)"`
// user's name, not unique
// Example: foobar
UserName string `json:"user_name,omitempty" db:"user_name,type=VARCHAR(255)"`
}
UserInfo User's Info
swagger:model UserInfo
func (*UserInfo) ContextValidate ¶
ContextValidate validates this user info based on context it is used
func (*UserInfo) MarshalBinary ¶
MarshalBinary interface implementation
func (*UserInfo) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type UserRole ¶
type UserRole struct {
// roles
Roles []*RoleView `json:"roles"`
// user_id
// Example: 1
UserID int64 `json:"user_id,omitempty"`
}
UserRole User Role Object
swagger:model UserRole
func (*UserRole) ContextValidate ¶
ContextValidate validate this user role based on the context it is used
func (*UserRole) MarshalBinary ¶
MarshalBinary interface implementation
func (*UserRole) UnmarshalBinary ¶
UnmarshalBinary interface implementation