impl

package
v0.0.0-...-553a587 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MulanPSL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InsertResourceSQL = `` /* 223-byte string literal not displayed */

	InsertDescribeSQL = `` /* 132-byte string literal not displayed */

	//select *  from resource  as r  left join host  as  h   on   r.id=h.resource_id    where  id  like  'ins-0%'  limit  2,5  ;
	QueryHostSQL = `` /* 174-byte string literal not displayed */

	DescribeHostSQL = `
	select 
	resource_id, cpu, memory, gpu_amount, gpu_spec, os_type, os_name, serial_number
	from
	resource
	`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostServiceImpl

type HostServiceImpl struct {
	// contains filtered or unexported fields
}

func NewHostServiceImpl

func NewHostServiceImpl() *HostServiceImpl

初始化全局db

func (*HostServiceImpl) Config

func (i *HostServiceImpl) Config()

func (*HostServiceImpl) CreateHost

func (i *HostServiceImpl) CreateHost(ctx context.Context, ins *hosts.Host) (*hosts.Host, error)

业务处理层

func (*HostServiceImpl) DeleteHost

func (i *HostServiceImpl) DeleteHost(ctx context.Context, req *hosts.DeleteHostRequest) ([]*hosts.Host, error)

func (*HostServiceImpl) DescribeHost

func (i *HostServiceImpl) DescribeHost(c *gin.Context, req *hosts.DescribeHostRequest) (*hosts.Host, error)

func (*HostServiceImpl) Name

func (i *HostServiceImpl) Name() string

func (*HostServiceImpl) QueueHost

func (i *HostServiceImpl) QueueHost(c *gin.Context, req *hosts.QueryHostRequest) (*hosts.HostSet, error)

func (*HostServiceImpl) UpdateHost

func (i *HostServiceImpl) UpdateHost(ctx *gin.Context, req *hosts.UpdateHostRequest) (*hosts.Host, error)

Jump to

Keyboard shortcuts

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