models

package
v0.0.0-...-acbd0ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2022 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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"
)
View Source
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"
)
View Source
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

func (m *AuthInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this auth info based on the context it is used

func (*AuthInfo) MarshalBinary

func (m *AuthInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AuthInfo) UnmarshalBinary

func (m *AuthInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AuthInfo) Validate

func (m *AuthInfo) Validate(formats strfmt.Registry) error

Validate validates this auth info

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

func (m *EnvironmentVariable) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*EnvironmentVariable) Validate

func (m *EnvironmentVariable) Validate(formats strfmt.Registry) error

Validate validates this environment variable

type Error

type Error struct {

	// 错误信息
	// Example: error message
	Message string `json:"message,omitempty"`
}

Error error

swagger:model Error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

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

func (m *GetTicketReq) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*GetTicketReq) Validate

func (m *GetTicketReq) Validate(formats strfmt.Registry) error

Validate validates this get ticket req

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

func (m *PodInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this pod info based on context it is used

func (*PodInfo) MarshalBinary

func (m *PodInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PodInfo) UnmarshalBinary

func (m *PodInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PodInfo) Validate

func (m *PodInfo) Validate(formats strfmt.Registry) error

Validate validates this pod info

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

func (m *ProjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ProjectInfo) Validate

func (m *ProjectInfo) Validate(formats strfmt.Registry) error

Validate validates this project info

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

func (m *ProjectRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ProjectRole) Validate

func (m *ProjectRole) Validate(formats strfmt.Registry) error

Validate validates this project role

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

func (m *RoleInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this role info based on context it is used

func (*RoleInfo) MarshalBinary

func (m *RoleInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RoleInfo) UnmarshalBinary

func (m *RoleInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RoleInfo) Validate

func (m *RoleInfo) Validate(formats strfmt.Registry) error

Validate validates this role info

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

func (m *RoleMember) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*RoleMember) Validate

func (m *RoleMember) Validate(formats strfmt.Registry) error

Validate validates this role member

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

func (m *RolePermission) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*RolePermission) Validate

func (m *RolePermission) Validate(formats strfmt.Registry) error

Validate validates this role permission

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

func (m *RoleView) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this role view based on the context it is used

func (*RoleView) MarshalBinary

func (m *RoleView) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RoleView) UnmarshalBinary

func (m *RoleView) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RoleView) Validate

func (m *RoleView) Validate(formats strfmt.Registry) error

Validate validates this role view

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

func (m *SSHPodTicket) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*SSHPodTicket) Validate

func (m *SSHPodTicket) Validate(formats strfmt.Registry) error

Validate validates this SSH pod ticket

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

func (m *ServiceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ServiceInfo) Validate

func (m *ServiceInfo) Validate(formats strfmt.Registry) error

Validate validates this service info

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

func (m *ServiceVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ServiceVersion) Validate

func (m *ServiceVersion) Validate(formats strfmt.Registry) error

Validate validates this service version

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

func (m *Token) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this token based on context it is used

func (*Token) MarshalBinary

func (m *Token) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Token) UnmarshalBinary

func (m *Token) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Token) Validate

func (m *Token) Validate(formats strfmt.Registry) error

Validate validates this token

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

func (m *UserInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this user info based on context it is used

func (*UserInfo) MarshalBinary

func (m *UserInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UserInfo) UnmarshalBinary

func (m *UserInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UserInfo) Validate

func (m *UserInfo) Validate(formats strfmt.Registry) error

Validate validates this user info

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

func (m *UserRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this user role based on the context it is used

func (*UserRole) MarshalBinary

func (m *UserRole) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UserRole) UnmarshalBinary

func (m *UserRole) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UserRole) Validate

func (m *UserRole) Validate(formats strfmt.Registry) error

Validate validates this user role

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL