business

package
v1.0.37 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Business

type Business struct {
	Id          uint32  `json:"id"`
	ServerId    uint32  `json:"serverId"`
	Keyword     string  `json:"keyword"`
	Type        string  `json:"type"`
	Description *string `json:"description"`
	CreatedAt   int64   `json:"createdAt"`
	UpdatedAt   int64   `json:"updatedAt"`
}

type BusinessValue

type BusinessValue struct {
	Id         uint32    `json:"id"`
	EnvId      uint32    `json:"envId"`
	BusinessId uint32    `json:"businessId"`
	Value      string    `json:"value"`
	CreatedAt  int64     `json:"createdAt"`
	UpdatedAt  int64     `json:"updatedAt"`
	Business   *Business `json:"business"`
}

type GetBusinessRequest added in v1.0.35

type GetBusinessRequest struct {
	Id *uint32 `json:"id"`
}

type ListBusinessRequest added in v1.0.35

type ListBusinessRequest struct {
	Page     uint32  `json:"page"`
	PageSize uint32  `json:"pageSize"`
	Order    *string `json:"order"`
	OrderBy  *string `json:"orderBy"`
	ServerId *uint32 `json:"serverId"`
	Keyword  *string `json:"keyword"`
}

type Repo

type Repo interface {
	// GetBusiness 获取指定的业务配置信息
	GetBusiness(ctx kratosx.Context, id uint32) (*Business, error)

	// ListBusiness 获取业务配置信息列表
	ListBusiness(ctx kratosx.Context, req *ListBusinessRequest) ([]*Business, uint32, error)

	// CreateBusiness 创建业务配置信息
	CreateBusiness(ctx kratosx.Context, req *Business) (uint32, error)

	// UpdateBusiness 更新业务配置信息
	UpdateBusiness(ctx kratosx.Context, req *Business) error

	// DeleteBusiness 删除业务配置信息
	DeleteBusiness(ctx kratosx.Context, ids []uint32) (uint32, error)

	// ListBusinessValue 获取业务配置值信息列表
	ListBusinessValue(ctx kratosx.Context, bid uint32) ([]*BusinessValue, uint32, error)

	// UpdateBusinessValues 更新业务配置值信息
	UpdateBusinessValues(ctx kratosx.Context, bs []*BusinessValue) error

	// AllBusinessField 获取全部可用的字段
	AllBusinessField(ctx kratosx.Context, sid uint32) ([]string, error)

	// AllBusinessValue 获取全部可以用的值
	AllBusinessValue(ctx kratosx.Context, eid, sid uint32) ([]*BusinessValue, error)
}

type UseCase

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

func NewUseCase

func NewUseCase(config *conf.Config, repo Repo) *UseCase

func (*UseCase) CreateBusiness added in v1.0.35

func (u *UseCase) CreateBusiness(ctx kratosx.Context, req *Business) (uint32, error)

CreateBusiness 创建业务配置信息

func (*UseCase) DeleteBusiness

func (u *UseCase) DeleteBusiness(ctx kratosx.Context, ids []uint32) (uint32, error)

DeleteBusiness 删除业务配置信息

func (*UseCase) GetBusiness

func (u *UseCase) GetBusiness(ctx kratosx.Context, req *GetBusinessRequest) (*Business, error)

GetBusiness 获取指定的业务配置信息

func (*UseCase) ListBusiness added in v1.0.35

func (u *UseCase) ListBusiness(ctx kratosx.Context, req *ListBusinessRequest) ([]*Business, uint32, error)

ListBusiness 获取业务配置信息列表

func (*UseCase) ListBusinessValue added in v1.0.35

func (u *UseCase) ListBusinessValue(ctx kratosx.Context, bid uint32) ([]*BusinessValue, uint32, error)

ListBusinessValue 获取业务配置值信息列表

func (*UseCase) UpdateBusiness

func (u *UseCase) UpdateBusiness(ctx kratosx.Context, req *Business) error

UpdateBusiness 更新业务配置信息

func (*UseCase) UpdateBusinessValue

func (u *UseCase) UpdateBusinessValue(ctx kratosx.Context, list []*BusinessValue) error

UpdateBusinessValue 更新业务配置值信息

Jump to

Keyboard shortcuts

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