publisher

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: 15 Imported by: 0

Documentation

Overview

Package publisher 封装Publisher资源相关操作

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePublisherKey

func GeneratePublisherKey() string

GeneratePublisherKey 生成publisherKey

Types

type Option

type Option func(*Publisher)

Option 定义 Publisher 对象的配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

func WithNexusSvc

func WithNexusSvc(svc *nexussvc.NexusSvc) Option

func WithUCClient

func WithUCClient(uc *ucauth.UCClient) Option

WithUCClient 配置 uc client

type Publisher

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

Publisher 资源对象操作封装

func New

func New(options ...Option) *Publisher

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

func (*Publisher) Create

func (p *Publisher) Create(userID string, createReq *apistructs.PublisherCreateRequest) (int64, error)

Create 创建Publisher

func (*Publisher) Delete

func (p *Publisher) Delete(publisherID, orgID int64) error

Delete 删除Publisher

func (*Publisher) Get

func (p *Publisher) Get(publisherID int64) (*apistructs.PublisherDTO, error)

Get 获取Publisher

func (*Publisher) ListAllPublishers

func (p *Publisher) ListAllPublishers(userID string, params *apistructs.PublisherListRequest) (
	*apistructs.PagingPublisherDTO, error)

ListAllPublishers 企业管理员可查看当前企业下所有Publisher,包括未加入的Publisher

func (*Publisher) ListJoinedPublishers

func (p *Publisher) ListJoinedPublishers(userID string, params *apistructs.PublisherListRequest) (
	*apistructs.PagingPublisherDTO, error)

ListJoinedPublishers 返回用户有权限的Publisher

func (*Publisher) Update

func (p *Publisher) Update(updateReq *apistructs.PublisherUpdateRequest) error

Update 更新Publisher

Jump to

Keyboard shortcuts

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