publisher

package
v1.0.1-rc3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePublisher

func CreatePublisher(ctx context.Context, project *models.Project, r *CreatePublisherReq) (*models.Publisher, error)

func GetPublisherByPubKeyAndProjectName added in v1.0.0

func GetPublisherByPubKeyAndProjectName(ctx context.Context, pubKey, prjName string) (*models.Publisher, error)

func GetPublisherByPublisherKey

func GetPublisherByPublisherKey(ctx context.Context, publisherKey string) (*models.Publisher, error)

func RemovePublisher

func RemovePublisher(ctx context.Context, r *RemovePublisherReq) error

func UpdatePublisher

func UpdatePublisher(ctx context.Context, project *models.Project, publisherID types.SFID, r *CreatePublisherReq) (err error)

Types

type CreatePublisherReq

type CreatePublisherReq struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

type InfoPublisher added in v1.0.0

type InfoPublisher struct {
	models.Publisher
	ProjectName string `db:"f_project_name"`
	datatypes.OperationTimes
}

type ListPublisherReq

type ListPublisherReq struct {
	datatypes.Pager
	// contains filtered or unexported fields
}

func (*ListPublisherReq) Additions

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

func (*ListPublisherReq) Condition

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

func (*ListPublisherReq) SetCurrentProject

func (r *ListPublisherReq) SetCurrentProject(prjID types.SFID)

type ListPublisherRsp

type ListPublisherRsp struct {
	Total int64           `json:"total"`
	Data  []InfoPublisher `json:"data"`
}

func ListPublisher

func ListPublisher(ctx context.Context, r *ListPublisherReq) (*ListPublisherRsp, error)

type RemovePublisherReq

type RemovePublisherReq struct {
	ProjectName  string       `in:"path" name:"projectName"`
	PublisherIDs []types.SFID `in:"query" name:"publisherID"`
}

Jump to

Keyboard shortcuts

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