env

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Id          uint32  `json:"id"`
	Token       string  `json:"token"`
	Keyword     string  `json:"keyword"`
	Name        string  `json:"name"`
	Status      *bool   `json:"status"`
	Description *string `json:"description"`
	CreatedAt   int64   `json:"createdAt"`
	UpdatedAt   int64   `json:"updatedAt"`
}

type GetEnvRequest added in v1.0.35

type GetEnvRequest struct {
	Id      *uint32 `json:"id"`
	Keyword *string `json:"keyword"`
}

type ListEnvRequest added in v1.0.35

type ListEnvRequest struct {
	Keyword *string `json:"keyword"`
	Name    *string `json:"name"`
	Status  *bool   `json:"status"`
}

type Repo

type Repo interface {
	// GetEnv 获取指定的环境信息
	GetEnv(ctx kratosx.Context, id uint32) (*Env, error)

	// ListEnv 获取环境信息列表
	ListEnv(ctx kratosx.Context, req *ListEnvRequest) ([]*Env, uint32, error)

	// CreateEnv 创建环境信息
	CreateEnv(ctx kratosx.Context, req *Env) (uint32, error)

	// UpdateEnv 更新环境信息
	UpdateEnv(ctx kratosx.Context, req *Env) error

	// DeleteEnv 删除环境信息
	DeleteEnv(ctx kratosx.Context, ids []uint32) (uint32, error)

	// GetEnvByKeyword 获取指定的环境信息
	GetEnvByKeyword(ctx kratosx.Context, keyword string) (*Env, error)

	// UpdateEnvStatus 更新环境信息状态
	UpdateEnvStatus(ctx kratosx.Context, id uint32, status bool) error
}

type UseCase

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

func NewUseCase

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

func (*UseCase) CreateEnv added in v1.0.35

func (u *UseCase) CreateEnv(ctx kratosx.Context, req *Env) (uint32, error)

CreateEnv 创建环境信息

func (*UseCase) DeleteEnv

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

DeleteEnv 删除环境信息

func (*UseCase) GetEnv

func (u *UseCase) GetEnv(ctx kratosx.Context, req *GetEnvRequest) (*Env, error)

GetEnv 获取指定的环境信息

func (*UseCase) ListEnv added in v1.0.35

func (u *UseCase) ListEnv(ctx kratosx.Context, req *ListEnvRequest) ([]*Env, uint32, error)

ListEnv 获取环境信息列表

func (*UseCase) UpdateEnv

func (u *UseCase) UpdateEnv(ctx kratosx.Context, req *Env) error

UpdateEnv 更新环境信息

func (*UseCase) UpdateEnvStatus added in v1.0.35

func (u *UseCase) UpdateEnvStatus(ctx kratosx.Context, id uint32, status bool) error

UpdateEnvStatus 更新环境信息状态

Jump to

Keyboard shortcuts

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