Documentation
¶
Index ¶
- Variables
- func NewAgentRepo(data *Data, logger log.Logger) biz.AgentRepo
- func NewAlipayOrderRollbackRepo(data *Data, logger log.Logger) biz.AlipayOrderRollbackRepo
- func NewComputeImageRepo(data *Data, logger log.Logger) biz.ComputeImageRepo
- func NewComputeInstanceRepo(data *Data, logger log.Logger) biz.ComputeInstanceRepo
- func NewComputeSpecRepo(data *Data, logger log.Logger) biz.ComputeSpecRepo
- func NewCycleOrderRepo(data *Data, logger log.Logger) biz.CycleOrderRepo
- func NewCycleRechargeRepo(data *Data, logger log.Logger) biz.CycleRechargeRepo
- func NewCycleRedeemCodeRepo(data *Data, logger log.Logger) biz.CycleRedeemCodeRepo
- func NewCycleRenewalRepo(data *Data, logger log.Logger) biz.CycleRenewalRepo
- func NewCycleRepo(data *Data, logger log.Logger) biz.CycleRepo
- func NewCycleTransactionRepo(data *Data, logger log.Logger) biz.CycleTransactionRepo
- func NewDB(conf *conf.Data, logger log.Logger) (*ent.Client, error)
- func NewDomainBindingRepository(data *Data, logger log.Logger) biz.DomainBindingRepository
- func NewGatewayPortRepo(data *Data, logger log.Logger) biz.GatewayPortRepo
- func NewGatewayRepo(data *Data, gatewayPortRepo biz.GatewayPortRepo, logger log.Logger) biz.GatewayRepo
- func NewNetworkMappingRepo(data *Data, logger log.Logger) biz.NetworkMappingRepo
- func NewRDB(conf *conf.Data) (*redis.Client, error)
- func NewS3UserRepo(data *Data, logger log.Logger) biz.S3UserRepo
- func NewScriptExecutionRecordRepo(data *Data, logger log.Logger) biz.ScriptExecutionRecordRepo
- func NewScriptRepo(data *Data, logger log.Logger) biz.ScriptRepo
- func NewStorageProviderRepo(data *Data, logger log.Logger) biz.StorageProviderRepo
- func NewStorageRepo(data *Data, logger log.Logger) biz.StorageRepo
- func NewTaskRepo(data *Data, logger log.Logger) biz.TaskRepo
- func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo
- func NewUserResourceLimitRepo(data *Data, logger log.Logger) biz.UserResourceLimitRepo
- type Data
- type GatewayPortRepo
- func (repo *GatewayPortRepo) CountGatewayPort(ctx context.Context) ([]*biz.GatewayPortCount, error)
- func (repo *GatewayPortRepo) CountIntranetGatewayPort(ctx context.Context) ([]*biz.GatewayPortCount, error)
- func (repo *GatewayPortRepo) CountIntranetGatewayPortByIsUsed(ctx context.Context, isUsed bool) ([]*biz.GatewayPortCount, error)
- func (repo *GatewayPortRepo) CountPublicGatewayPort(ctx context.Context) ([]*biz.GatewayPortCount, error)
- func (repo *GatewayPortRepo) CountPublicGatewayPortByIsUsed(ctx context.Context, isUsed bool) ([]*biz.GatewayPortCount, error)
- func (repo *GatewayPortRepo) GetGatewayPortByGatewayIdAndPort(ctx context.Context, gatewayId uuid.UUID, port int32) (*biz.GatewayPort, error)
- func (repo *GatewayPortRepo) GetGatewayPortFirstByNotUsed(ctx context.Context, gatewayID uuid.UUID) (*biz.GatewayPort, error)
- func (repo *GatewayPortRepo) GetGatewayPortFirstByNotUsedAndIsPublic(ctx context.Context, gatewayID uuid.UUID, isPublic bool) (*biz.GatewayPort, error)
- func (repo *GatewayPortRepo) Update(ctx context.Context, gp *biz.GatewayPort) error
- type GatewayRepo
- func (repo *GatewayRepo) CountGateway(ctx context.Context) (int, error)
- func (repo *GatewayRepo) FindInstanceSuitableGateway(ctx context.Context, instanceId uuid.UUID) (*biz.Gateway, error)
- func (repo *GatewayRepo) GetGateway(ctx context.Context, id uuid.UUID) (*biz.Gateway, error)
- func (repo *GatewayRepo) ListGateway(ctx context.Context) ([]*biz.Gateway, error)
- type NetworkMappingRepo
- func (repo *NetworkMappingRepo) CountNetworkMappingByUserId(ctx context.Context, userId uuid.UUID) (int, error)
- func (repo *NetworkMappingRepo) CountNetworkMappingByUserIdAndInstanceId(ctx context.Context, userId uuid.UUID, instanceId uuid.UUID) (int, error)
- func (repo *NetworkMappingRepo) CreateNetworkMapping(ctx context.Context, entity *biz.NetworkMapping) error
- func (repo *NetworkMappingRepo) DeleteNetworkMapping(ctx context.Context, id uuid.UUID) error
- func (repo *NetworkMappingRepo) GetNetworkMapping(ctx context.Context, id uuid.UUID) (*biz.NetworkMapping, error)
- func (repo *NetworkMappingRepo) GetNetworkMappingByPublicIpdAndPort(ctx context.Context, ip string, port int32) (*biz.NetworkMapping, error)
- func (repo *NetworkMappingRepo) ListByComputeInstanceId(ctx context.Context, computeInstanceId uuid.UUID) ([]*biz.NetworkMapping, error)
- func (repo *NetworkMappingRepo) PageNetworkMappingByUserID(ctx context.Context, userId uuid.UUID, page int32, size int32) ([]*biz.NetworkMapping, int32, error)
- func (repo *NetworkMappingRepo) QueryGatewayIdByAgentId(ctx context.Context, agentId uuid.UUID) (uuid.UUID, error)
- func (repo *NetworkMappingRepo) QueryGatewayIdByComputeIds(ctx context.Context, computeInstanceIds []uuid.UUID) (uuid.UUID, error)
- func (repo *NetworkMappingRepo) UpdateNetworkMapping(ctx context.Context, id uuid.UUID, entity *biz.NetworkMapping) error
- type TaskRepo
- func (repo *TaskRepo) CreateTask(ctx context.Context, entity *biz.Task) error
- func (repo *TaskRepo) GetTask(ctx context.Context, id uuid.UUID) (*biz.Task, error)
- func (repo *TaskRepo) GetToDoTaskByAgentId(ctx context.Context, agentId string) (*biz.Task, error)
- func (repo *TaskRepo) ListTaskByAgentID(ctx context.Context, agentID string) ([]*biz.Task, error)
- func (repo *TaskRepo) UpdateTask(ctx context.Context, entity *biz.Task) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewDB, NewRDB, NewData, NewAgentRepo, NewUserRepo, NewStorageRepo, NewComputeSpecRepo, NewComputeInstanceRepo, NewComputeImageRepo, NewScriptRepo, NewScriptExecutionRecordRepo, NewNetworkMappingRepo, NewGatewayRepo, NewGatewayPortRepo, NewTaskRepo, NewDomainBindingRepository, NewS3UserRepo, NewStorageProviderRepo, NewCycleRepo, NewCycleOrderRepo, NewCycleTransactionRepo, NewCycleRechargeRepo, NewCycleRenewalRepo, NewCycleRedeemCodeRepo, NewAlipayOrderRollbackRepo, NewUserResourceLimitRepo, )
ProviderSet is data providers.
Functions ¶
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 NewCycleTransactionRepo ¶
func NewCycleTransactionRepo(data *Data, logger log.Logger) biz.CycleTransactionRepo
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 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 NewUserResourceLimitRepo ¶
func NewUserResourceLimitRepo(data *Data, logger log.Logger) biz.UserResourceLimitRepo
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data .
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 (*GatewayRepo) GetGateway ¶
func (*GatewayRepo) ListGateway ¶
type NetworkMappingRepo ¶
type NetworkMappingRepo struct {
// contains filtered or unexported fields
}
func (*NetworkMappingRepo) CountNetworkMappingByUserId ¶
func (*NetworkMappingRepo) CountNetworkMappingByUserIdAndInstanceId ¶
func (*NetworkMappingRepo) CreateNetworkMapping ¶
func (repo *NetworkMappingRepo) CreateNetworkMapping(ctx context.Context, entity *biz.NetworkMapping) error
func (*NetworkMappingRepo) DeleteNetworkMapping ¶
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 (*NetworkMappingRepo) QueryGatewayIdByAgentId ¶
func (*NetworkMappingRepo) QueryGatewayIdByComputeIds ¶
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 (*TaskRepo) GetToDoTaskByAgentId ¶
func (*TaskRepo) ListTaskByAgentID ¶
Source Files
¶
- agent.go
- alipay_order_rollback.go
- compute_image.go
- compute_instance.go
- compute_spec.go
- cycle.go
- cycle_order.go
- cycle_recharge.go
- cycle_redeem_code.go
- cycle_renew.go
- cycle_transaction.go
- data.go
- domain_binding.go
- gateway.go
- gateway_port.go
- network_mapping.go
- script.go
- script_execution_record.go
- storage.go
- storage_provider.go
- storage_s3.go
- task.go
- user.go
- user_resource_limit.go
Click to show internal directories.
Click to hide internal directories.