data

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 57 Imported by: 0

README

Data

go generate ./ent

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewAgentRepo

func NewAgentRepo(data *Data, logger log.Logger) biz.AgentRepo

func NewAlipayOrderRollbackRepo

func NewAlipayOrderRollbackRepo(data *Data, logger log.Logger) biz.AlipayOrderRollbackRepo

func NewComputeImageRepo

func NewComputeImageRepo(data *Data, logger log.Logger) biz.ComputeImageRepo

func NewComputeInstanceRepo

func NewComputeInstanceRepo(data *Data, logger log.Logger) biz.ComputeInstanceRepo

func NewComputeSpecRepo

func NewComputeSpecRepo(data *Data, logger log.Logger) biz.ComputeSpecRepo

func NewCycleOrderRepo

func NewCycleOrderRepo(data *Data, logger log.Logger) biz.CycleOrderRepo

func NewCycleRechargeRepo

func NewCycleRechargeRepo(data *Data, logger log.Logger) biz.CycleRechargeRepo

func NewCycleRedeemCodeRepo

func NewCycleRedeemCodeRepo(data *Data, logger log.Logger) biz.CycleRedeemCodeRepo

func NewCycleRenewalRepo

func NewCycleRenewalRepo(data *Data, logger log.Logger) biz.CycleRenewalRepo

func NewCycleRepo

func NewCycleRepo(data *Data, logger log.Logger) biz.CycleRepo

NewCycleRepo .

func NewCycleTransactionRepo

func NewCycleTransactionRepo(data *Data, logger log.Logger) biz.CycleTransactionRepo

func NewDB

func NewDB(conf *conf.Data, logger log.Logger) (*ent.Client, error)

func NewDomainBindingRepository

func NewDomainBindingRepository(data *Data, logger log.Logger) biz.DomainBindingRepository

func NewGatewayPortRepo

func NewGatewayPortRepo(data *Data, logger log.Logger) biz.GatewayPortRepo

func NewGatewayRepo

func NewGatewayRepo(data *Data, gatewayPortRepo biz.GatewayPortRepo, logger log.Logger) biz.GatewayRepo

func NewNetworkMappingRepo

func NewNetworkMappingRepo(data *Data, logger log.Logger) biz.NetworkMappingRepo

func NewRDB

func NewRDB(conf *conf.Data) (*redis.Client, error)

func NewS3UserRepo

func NewS3UserRepo(data *Data, logger log.Logger) biz.S3UserRepo

func NewScriptExecutionRecordRepo

func NewScriptExecutionRecordRepo(data *Data, logger log.Logger) biz.ScriptExecutionRecordRepo

NewScriptExecutionRecordRepo .

func NewScriptRepo

func NewScriptRepo(data *Data, logger log.Logger) biz.ScriptRepo

NewScriptRepo .

func NewStorageProviderRepo

func NewStorageProviderRepo(data *Data, logger log.Logger) biz.StorageProviderRepo

func NewStorageRepo

func NewStorageRepo(data *Data, logger log.Logger) biz.StorageRepo

func NewTaskRepo

func NewTaskRepo(data *Data, logger log.Logger) biz.TaskRepo

func NewUserRepo

func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo

func NewUserResourceLimitRepo

func NewUserResourceLimitRepo(data *Data, logger log.Logger) biz.UserResourceLimitRepo

Types

type Data

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

Data .

func NewData

func NewData(db *ent.Client, rdb *redis.Client, logger log.Logger) (*Data, func(), error)

NewData .

func (*Data) GetDB

func (d *Data) GetDB() *ent.Client

func (*Data) GetUserResourceLimit

func (d *Data) GetUserResourceLimit(ctx context.Context) *ent.UserResourceLimitClient

type GatewayPortRepo

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

func (*GatewayPortRepo) CountGatewayPort

func (repo *GatewayPortRepo) CountGatewayPort(ctx context.Context) ([]*biz.GatewayPortCount, error)

func (*GatewayPortRepo) CountIntranetGatewayPort

func (repo *GatewayPortRepo) CountIntranetGatewayPort(ctx context.Context) ([]*biz.GatewayPortCount, error)

func (*GatewayPortRepo) CountIntranetGatewayPortByIsUsed

func (repo *GatewayPortRepo) CountIntranetGatewayPortByIsUsed(ctx context.Context, isUsed bool) ([]*biz.GatewayPortCount, error)

func (*GatewayPortRepo) CountPublicGatewayPort

func (repo *GatewayPortRepo) CountPublicGatewayPort(ctx context.Context) ([]*biz.GatewayPortCount, error)

func (*GatewayPortRepo) CountPublicGatewayPortByIsUsed

func (repo *GatewayPortRepo) CountPublicGatewayPortByIsUsed(ctx context.Context, isUsed bool) ([]*biz.GatewayPortCount, error)

func (*GatewayPortRepo) GetGatewayPortByGatewayIdAndPort

func (repo *GatewayPortRepo) GetGatewayPortByGatewayIdAndPort(ctx context.Context, gatewayId uuid.UUID, port int32) (*biz.GatewayPort, error)

func (*GatewayPortRepo) GetGatewayPortFirstByNotUsed

func (repo *GatewayPortRepo) GetGatewayPortFirstByNotUsed(ctx context.Context, gatewayID uuid.UUID) (*biz.GatewayPort, error)

func (*GatewayPortRepo) GetGatewayPortFirstByNotUsedAndIsPublic

func (repo *GatewayPortRepo) GetGatewayPortFirstByNotUsedAndIsPublic(ctx context.Context, gatewayID uuid.UUID, isPublic bool) (*biz.GatewayPort, error)

func (*GatewayPortRepo) Update

func (repo *GatewayPortRepo) Update(ctx context.Context, gp *biz.GatewayPort) error

type GatewayRepo

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

func (*GatewayRepo) CountGateway

func (repo *GatewayRepo) CountGateway(ctx context.Context) (int, error)

func (*GatewayRepo) FindInstanceSuitableGateway

func (repo *GatewayRepo) FindInstanceSuitableGateway(ctx context.Context, instanceId uuid.UUID) (*biz.Gateway, error)

func (*GatewayRepo) GetGateway

func (repo *GatewayRepo) GetGateway(ctx context.Context, id uuid.UUID) (*biz.Gateway, error)

func (*GatewayRepo) ListGateway

func (repo *GatewayRepo) ListGateway(ctx context.Context) ([]*biz.Gateway, error)

type NetworkMappingRepo

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

func (*NetworkMappingRepo) CountNetworkMappingByUserId

func (repo *NetworkMappingRepo) CountNetworkMappingByUserId(ctx context.Context, userId uuid.UUID) (int, error)

func (*NetworkMappingRepo) CountNetworkMappingByUserIdAndInstanceId

func (repo *NetworkMappingRepo) CountNetworkMappingByUserIdAndInstanceId(ctx context.Context, userId uuid.UUID, instanceId uuid.UUID) (int, error)

func (*NetworkMappingRepo) CreateNetworkMapping

func (repo *NetworkMappingRepo) CreateNetworkMapping(ctx context.Context, entity *biz.NetworkMapping) error

func (*NetworkMappingRepo) DeleteNetworkMapping

func (repo *NetworkMappingRepo) DeleteNetworkMapping(ctx context.Context, id uuid.UUID) error

func (*NetworkMappingRepo) GetNetworkMapping

func (repo *NetworkMappingRepo) GetNetworkMapping(ctx context.Context, id uuid.UUID) (*biz.NetworkMapping, error)

func (*NetworkMappingRepo) GetNetworkMappingByPublicIpdAndPort

func (repo *NetworkMappingRepo) GetNetworkMappingByPublicIpdAndPort(ctx context.Context, ip string, port int32) (*biz.NetworkMapping, error)

func (*NetworkMappingRepo) ListByComputeInstanceId

func (repo *NetworkMappingRepo) ListByComputeInstanceId(ctx context.Context, computeInstanceId uuid.UUID) ([]*biz.NetworkMapping, error)

func (*NetworkMappingRepo) PageNetworkMappingByUserID

func (repo *NetworkMappingRepo) PageNetworkMappingByUserID(ctx context.Context, userId uuid.UUID, page int32, size int32) ([]*biz.NetworkMapping, int32, error)

func (*NetworkMappingRepo) QueryGatewayIdByAgentId

func (repo *NetworkMappingRepo) QueryGatewayIdByAgentId(ctx context.Context, agentId uuid.UUID) (uuid.UUID, error)

func (*NetworkMappingRepo) QueryGatewayIdByComputeIds

func (repo *NetworkMappingRepo) QueryGatewayIdByComputeIds(ctx context.Context, computeInstanceIds []uuid.UUID) (uuid.UUID, error)

func (*NetworkMappingRepo) UpdateNetworkMapping

func (repo *NetworkMappingRepo) UpdateNetworkMapping(ctx context.Context, id uuid.UUID, entity *biz.NetworkMapping) error

type TaskRepo

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

func (*TaskRepo) CreateTask

func (repo *TaskRepo) CreateTask(ctx context.Context, entity *biz.Task) error

func (*TaskRepo) GetTask

func (repo *TaskRepo) GetTask(ctx context.Context, id uuid.UUID) (*biz.Task, error)

func (*TaskRepo) GetToDoTaskByAgentId

func (repo *TaskRepo) GetToDoTaskByAgentId(ctx context.Context, agentId string) (*biz.Task, error)

func (*TaskRepo) ListTaskByAgentID

func (repo *TaskRepo) ListTaskByAgentID(ctx context.Context, agentID string) ([]*biz.Task, error)

func (*TaskRepo) UpdateTask

func (repo *TaskRepo) UpdateTask(ctx context.Context, entity *biz.Task) error

Jump to

Keyboard shortcuts

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