publisher

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v1.1.0

func Create(ctx context.Context, r *CreateReq) (*models.Publisher, error)

func CreateAnonymousPublisher added in v1.5.9

func CreateAnonymousPublisher(ctx context.Context) (*models.Publisher, error)

func GetByProjectAndKey added in v1.1.0

func GetByProjectAndKey(ctx context.Context, prj types.SFID, key string) (*models.Publisher, error)

func GetBySFID added in v1.1.0

func GetBySFID(ctx context.Context, id types.SFID) (*models.Publisher, error)

func ListByCond added in v1.1.0

func ListByCond(ctx context.Context, r *CondArgs) (data []models.Publisher, err error)

func Remove added in v1.1.0

func Remove(ctx context.Context, acc *models.Account, r *CondArgs) error

func RemoveByProjectAndKey added in v1.1.0

func RemoveByProjectAndKey(ctx context.Context, prj types.SFID, key string) error

func RemoveBySFID added in v1.1.0

func RemoveBySFID(ctx context.Context, acc *models.Account, prj *models.Project, id types.SFID) error

func SetAnonymousPublisher added in v1.5.9

func SetAnonymousPublisher(ctx context.Context, tok string) (string, error)

func Update added in v1.1.0

func Update(ctx context.Context, r *UpdateReq) error

func Upsert added in v1.5.9

func Upsert(ctx context.Context, r *CreateReq) (*models.Publisher, error)

Types

type CondArgs added in v1.1.0

type CondArgs struct {
	ProjectIDs   []types.SFID `name:"-"`
	PublisherIDs []types.SFID `in:"query" name:"publisherIDs,omitempty"`
	Names        []string     `in:"query" name:"name,omitempty"`
	Keys         []string     `in:"query" name:"key,omitempty"`
	NameLike     string       `in:"query" name:"name,omitempty"`
	LNameLike    string       `in:"query" name:"lname,omitempty"`
	RNameLike    string       `in:"query" name:"rname,omitempty"`
}

func (*CondArgs) Condition added in v1.1.0

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

type CreateReq added in v1.1.0

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

type Detail added in v1.1.0

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

type ListDetailRsp added in v1.1.0

type ListDetailRsp struct {
	Total int64     `json:"total"`
	Data  []*Detail `json:"data"`
}

func ListDetail added in v1.1.0

func ListDetail(ctx context.Context, r *ListReq) (*ListDetailRsp, error)

type ListReq added in v1.1.0

type ListReq struct {
	CondArgs
	datatypes.Pager
}

func (*ListReq) Additions added in v1.1.0

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

type ListRsp added in v1.1.0

type ListRsp struct {
	Data  []models.Publisher `json:"data"`
	Total int64              `json:"total"`
}

func List added in v1.1.0

func List(ctx context.Context, r *ListReq) (*ListRsp, error)

type UpdateReq added in v1.1.0

type UpdateReq struct {
	PublisherID types.SFID `json:"-"`
	Name        string     `json:"name"`
	Key         string     `json:"key"`
}

Jump to

Keyboard shortcuts

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