org

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 20 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Org)

Option 定义 Org 对象的配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithCMP added in v1.4.0

WithCMP sets the gRPC client to invoke CMP service Todo: the dependency on CMP will be moved to a service which is more suitable

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

func WithNexusSvc

func WithNexusSvc(svc *nexussvc.NexusSvc) Option

WithNexusSvc 配置 nexus service

func WithPublisher

func WithPublisher(publisher *publisher.Publisher) Option

WithPublisher 配置 publisher

func WithRedisClient

func WithRedisClient(cli *redis.Client) Option

WithRedisClient 配置 redis client

func WithTrans added in v1.4.0

func WithTrans(trans i18n.Translator) Option

WithTrans sets the i18n.Translator

func WithUCClient

func WithUCClient(uc *ucauth.UCClient) Option

WithUCClient 配置 uc client

type Org

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

func New

func New(options ...Option) *Org

New 新建 Org 实例,通过 Org 实例操作企业资源

func (*Org) EnsureNexusOrgGroupRepos

func (o *Org) EnsureNexusOrgGroupRepos(org *apistructs.OrgDTO) error

func (*Org) FetchOrgClusterResource added in v1.4.0

func (o *Org) FetchOrgClusterResource(ctx context.Context, orgID uint64) (*apistructs.OrgClustersResourcesInfo, error)

func (*Org) GetNexusOrgDockerCredential

func (o *Org) GetNexusOrgDockerCredential(orgID uint64, image string) (*apistructs.NexusUser, error)

GetNexusOrgDockerCredential 根据 image 返回 docker pull 认证信息

func (*Org) GetOrgLevelNexus

func (o *Org) GetOrgLevelNexus(orgID uint64, req *apistructs.OrgNexusGetRequest) (*apistructs.OrgNexusGetResponseData, error)

func (*Org) GetPublisherID

func (o *Org) GetPublisherID(orgID int64) int64

func (*Org) ShowOrgNexusPassword

func (o *Org) ShowOrgNexusPassword(req *apistructs.OrgNexusShowPasswordRequest) (map[uint64]string, error)

Jump to

Keyboard shortcuts

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