project

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProject

func CreateProject(ctx context.Context, r *CreateProjectReq, hdl mq.OnMessage) (*models.Project, error)

func DeleteProject

func DeleteProject(_ context.Context, _ string) error

func GetProjectByProjectName

func GetProjectByProjectName(ctx context.Context, prjName string) (*models.Project, error)

func InitChannels

func InitChannels(ctx context.Context, hdl mq.OnMessage) error

func RemoveProjectByProjectID

func RemoveProjectByProjectID(ctx context.Context, prjID types.SFID) error

Types

type AppletDetail

type AppletDetail struct {
	AppletID        types.SFID          `json:"appletID"`
	AppletName      string              `json:"appletName"`
	InstanceID      types.SFID          `json:"instanceID,omitempty"`
	InstanceState   enums.InstanceState `json:"instanceState,omitempty"`
	InstanceVMState enums.InstanceState `json:"instanceStateVM,omitempty"`
}

type CreateProjectReq

type CreateProjectReq struct {
	models.ProjectName
	models.ProjectBase
}

type Detail

type Detail struct {
	ProjectID   types.SFID     `json:"projectID"`
	ProjectName string         `json:"projectName"`
	Applets     []AppletDetail `json:"applets,omitempty"`
	datatypes.OperationTimes
}

func GetProjectByProjectID

func GetProjectByProjectID(ctx context.Context, prjID types.SFID) (*Detail, error)

type ListProjectReq

type ListProjectReq struct {
	IDs        []uint64     `in:"query" name:"ids,omitempty"`
	ProjectIDs []types.SFID `in:"query" name:"projectIDs,omitempty"`
	Names      []string     `in:"query" name:"names,omitempty"`
	NameLike   string       `in:"query" name:"name,omitempty"`
	datatypes.Pager
	// contains filtered or unexported fields
}

func (*ListProjectReq) Additions

func (r *ListProjectReq) Additions() builder.Additions

func (*ListProjectReq) Condition

func (r *ListProjectReq) Condition() builder.SqlCondition

func (*ListProjectReq) SetCurrentAccount

func (r *ListProjectReq) SetCurrentAccount(accountID types.SFID)

type ListProjectRsp

type ListProjectRsp struct {
	Data  []Detail `json:"data"`  // Data project data list
	Total int64    `json:"total"` // Total project count under current user
}

func ListProject

func ListProject(ctx context.Context, r *ListProjectReq) (*ListProjectRsp, error)

Jump to

Keyboard shortcuts

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