resource

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Resource)

Option 应用实例对象配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dbclient.DBClient) Option

WithDBClient 配置 db client

type Resource

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

Resource 应用实例对象封装

func New

func New(options ...Option) *Resource

New 新建应用实例 service

func (*Resource) GetProjectAddonResource

func (a *Resource) GetProjectAddonResource(projectIDs []uint64) (*map[uint64]apistructs.ProjectResourceItem, error)

GetProjectAddonResource 获取project下,addon的使用资源

func (*Resource) GetProjectServiceResource

func (r *Resource) GetProjectServiceResource(projectIDs []uint64) (*map[uint64]apistructs.ProjectResourceItem, error)

GetProjectServiceResource 获取project下,service的使用资源

Jump to

Keyboard shortcuts

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