object

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 4 Imported by: 0 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 Object

type Object struct {
	types.BaseModel
	Keyword     string  `json:"keyword"`
	Name        string  `json:"name"`
	Api         string  `json:"api"`
	Method      string  `json:"method"`
	Params      *string `json:"params"`
	Label       string  `json:"label"`
	Value       string  `json:"value"`
	Description string  `json:"description"`
}

type ObjectRule

type ObjectRule struct {
	Field   string `json:"field"`
	Operate string `json:"operate"`
	Object  uint32 `json:"object"`
}

type PageObjectRequest

type PageObjectRequest struct {
	Page     uint32  `json:"page"`
	PageSize uint32  `json:"page_size"`
	Keyword  *string `json:"keyword"`
	Name     *string `json:"name"`
}

type Repo

type Repo interface {
	GetObjectById(ctx kratosx.Context, id uint32) (*Object, error)
	GetObjectByKeyword(ctx kratosx.Context, keyword string) (*Object, error)
	PageObject(ctx kratosx.Context, req *PageObjectRequest) ([]*Object, uint32, error)
	AddObject(ctx kratosx.Context, c *Object) (uint32, error)
	UpdateObject(ctx kratosx.Context, c *Object) error
	DeleteObject(ctx kratosx.Context, uint322 uint32) error
}

type UseCase

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

func NewUseCase

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

func (*UseCase) AddObject

func (u *UseCase) AddObject(ctx kratosx.Context, object *Object) (uint32, error)

AddObject 添加登录资源对象信息

func (*UseCase) DeleteObject

func (u *UseCase) DeleteObject(ctx kratosx.Context, id uint32) error

DeleteObject 删除登录资源对象信息

func (*UseCase) GetObjectById

func (u *UseCase) GetObjectById(ctx kratosx.Context, id uint32) (*Object, error)

GetObjectById 获取指定资源对象

func (*UseCase) GetObjectByKeyword

func (u *UseCase) GetObjectByKeyword(ctx kratosx.Context, keyword string) (*Object, error)

GetObjectByKeyword 获取指定资源对象

func (*UseCase) PageObject

func (u *UseCase) PageObject(ctx kratosx.Context, req *PageObjectRequest) ([]*Object, uint32, error)

PageObject 获取全部登录资源对象

func (*UseCase) UpdateObject

func (u *UseCase) UpdateObject(ctx kratosx.Context, object *Object) error

UpdateObject 更新登录资源对象信息

Jump to

Keyboard shortcuts

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