Documentation
¶
Index ¶
- type AuthService
- func (s *AuthService) Auhenticate(ctx context.Context, opts *entity.AuthUserOptions) (*entity.Auth, error)
- func (s *AuthService) CreateAuth(ctx context.Context, auth *entity.Auth) error
- func (s *AuthService) DeleteAuth(ctx context.Context, id int64) error
- func (s *AuthService) FindAuthByID(ctx context.Context, id int64) (*entity.Auth, error)
- func (s *AuthService) FindAuths(ctx context.Context, filter service.AuthFilter) (entity.Auths, int, error)
- type CPUsPoolService
- type ContractService
- func (c *ContractService) CreateContract(ctx context.Context, contract *entity.Contract) error
- func (c *ContractService) DeleteContract(ctx context.Context, id int64) error
- func (c *ContractService) FindContractByID(ctx context.Context, id int64) (*entity.Contract, error)
- func (c *ContractService) FindContracts(ctx context.Context, filter service.ContractFilter) (entity.Contracts, int, error)
- func (c *ContractService) FindRevisionByContractAndRev(ctx context.Context, contractID int64, rev entity.RevisionNumber) (*entity.Revision, error)
- func (c *ContractService) MakeRevision(ctx context.Context, revision *entity.Revision) error
- func (c *ContractService) UpdateContract(ctx context.Context, id int64, contract service.ContractUpdate) (*entity.Contract, error)
- type EngineService
- func (e *EngineService) ExecContract(ctx context.Context, opt service.ContractCallOpt) (res interface{}, err error)
- func (e *EngineService) IsRunning() bool
- func (e *EngineService) Pause() error
- func (e *EngineService) Resume() error
- func (e *EngineService) State() entity.VmState
- func (e *EngineService) Stop() error
- type ExecutorService
- type FuelMonitorService
- type FuelMonitorServiceNoOp
- type FuelStationService
- type FuelTankService
- func (ft *FuelTankService) Burn(ctx context.Context, fuel entity.Fuel) error
- func (ft *FuelTankService) Fuel(ctx context.Context) (entity.Fuel, error)
- func (ft *FuelTankService) Refuel(ctx context.Context, fuelToRefill entity.Fuel) error
- func (ft *FuelTankService) Stats(ctx context.Context) (*entity.FuelStat, error)
- type FuelTankServiceNoOp
- func (ft *FuelTankServiceNoOp) Burn(ctx context.Context, fuel entity.Fuel) error
- func (ft *FuelTankServiceNoOp) Fuel(ctx context.Context) (entity.Fuel, error)
- func (ft *FuelTankServiceNoOp) Refuel(ctx context.Context, fuelToRefill entity.Fuel) error
- func (ft *FuelTankServiceNoOp) Stats(ctx context.Context) (*entity.FuelStat, error)
- type JWTBlacklistService
- type JWTService
- func (s *JWTService) Exchange(ctx context.Context, auth *entity.Auth) (*entity.TokenPair, error)
- func (s *JWTService) Invalidate(ctx context.Context, token string, expiration time.Duration) error
- func (s *JWTService) Parse(ctx context.Context, token string) (*entity.AppClaims, error)
- func (s *JWTService) Refresh(ctx context.Context, refreshToken string) (*entity.TokenPair, error)
- type LockService
- type Logger
- func (l *Logger) Crit(msg string, ctx ...interface{})
- func (l *Logger) Debug(msg string, ctx ...interface{})
- func (l *Logger) Error(msg string, ctx ...interface{})
- func (l *Logger) GetHandler() log15.Handler
- func (l *Logger) Info(msg string, ctx ...interface{})
- func (l *Logger) New(ctx ...interface{}) log15.Logger
- func (l *Logger) SetHandler(h log15.Handler)
- func (l *Logger) Warn(msg string, ctx ...interface{})
- type LoggerNoOp
- func (l *LoggerNoOp) Crit(msg string, ctx ...interface{})
- func (l *LoggerNoOp) Debug(msg string, ctx ...interface{})
- func (l *LoggerNoOp) Error(msg string, ctx ...interface{})
- func (l *LoggerNoOp) GetHandler() log15.Handler
- func (l *LoggerNoOp) Info(msg string, ctx ...interface{})
- func (l *LoggerNoOp) New(ctx ...interface{}) log15.Logger
- func (l *LoggerNoOp) SetHandler(h log15.Handler)
- func (l *LoggerNoOp) Warn(msg string, ctx ...interface{})
- type StateCacheService
- type StateService
- func (s *StateService) CreateState(ctx context.Context, state *entity.State) error
- func (s *StateService) FindStateByRevisionID(ctx context.Context, revisionID int64) (*entity.State, error)
- func (s *StateService) UpdateState(ctx context.Context, revisionID int64, value entity.StateValue) (*entity.State, error)
- type UserService
- func (s *UserService) CreateUser(ctx context.Context, user *entity.User) error
- func (s *UserService) DeleteUser(ctx context.Context, id int64) error
- func (s *UserService) FindUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (s *UserService) FindUserByID(ctx context.Context, id int64) (*entity.User, error)
- func (s *UserService) FindUsers(ctx context.Context, filter service.UserFilter) (entity.Users, int, error)
- func (s *UserService) UpdateUser(ctx context.Context, id int64, user service.UserUpdate) (*entity.User, error)
- type VmCallableService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct { AuthentcateFn func(ctx context.Context, opts *entity.AuthUserOptions) (*entity.Auth, error) FindAuthByIDFn func(ctx context.Context, id int64) (*entity.Auth, error) FindAuthsFn func(ctx context.Context, filter service.AuthFilter) (entity.Auths, int, error) CreateAuthFn func(ctx context.Context, auth *entity.Auth) error DeleteAuthFn func(ctx context.Context, id int64) error }
func (*AuthService) Auhenticate ¶
func (s *AuthService) Auhenticate(ctx context.Context, opts *entity.AuthUserOptions) (*entity.Auth, error)
func (*AuthService) CreateAuth ¶
func (*AuthService) DeleteAuth ¶
func (s *AuthService) DeleteAuth(ctx context.Context, id int64) error
func (*AuthService) FindAuthByID ¶
type CPUsPoolService ¶ added in v0.0.7
type CPUsPoolService struct {
AcquireCoreFn func(ctx context.Context, call service.VmCallable) (release func(), err error)
}
func (*CPUsPoolService) AcquireCore ¶ added in v0.0.7
func (s *CPUsPoolService) AcquireCore(ctx context.Context, call service.VmCallable) (release func(), err error)
type ContractService ¶
type ContractService struct { FindContractByIDFn func(ctx context.Context, id int64) (*entity.Contract, error) FindContractsFn func(ctx context.Context, filter service.ContractFilter) (entity.Contracts, int, error) FindRevisionByContractAndRevFn func(ctx context.Context, contractID int64, rev entity.RevisionNumber) (*entity.Revision, error) CreateContractFn func(ctx context.Context, contract *entity.Contract) error DeleteContractFn func(ctx context.Context, id int64) error MakeRevisionFn func(ctx context.Context, revision *entity.Revision) error UpdateContractFn func(ctx context.Context, id int64, contract service.ContractUpdate) (*entity.Contract, error) }
func (*ContractService) CreateContract ¶
func (*ContractService) DeleteContract ¶
func (c *ContractService) DeleteContract(ctx context.Context, id int64) error
func (*ContractService) FindContractByID ¶
func (*ContractService) FindContracts ¶
func (c *ContractService) FindContracts(ctx context.Context, filter service.ContractFilter) (entity.Contracts, int, error)
func (*ContractService) FindRevisionByContractAndRev ¶
func (c *ContractService) FindRevisionByContractAndRev(ctx context.Context, contractID int64, rev entity.RevisionNumber) (*entity.Revision, error)
func (*ContractService) MakeRevision ¶
func (*ContractService) UpdateContract ¶
func (c *ContractService) UpdateContract(ctx context.Context, id int64, contract service.ContractUpdate) (*entity.Contract, error)
type EngineService ¶
type EngineService struct { ExecContractFn func(ctx context.Context, opt service.ContractCallOpt) (res interface{}, err error) IsRunningFn func() bool PauseFn func() error ResumeFn func() error StateFn func() entity.VmState StopFn func() error }
func (*EngineService) ExecContract ¶
func (e *EngineService) ExecContract(ctx context.Context, opt service.ContractCallOpt) (res interface{}, err error)
func (*EngineService) IsRunning ¶
func (e *EngineService) IsRunning() bool
func (*EngineService) Pause ¶
func (e *EngineService) Pause() error
func (*EngineService) Resume ¶
func (e *EngineService) Resume() error
func (*EngineService) State ¶
func (e *EngineService) State() entity.VmState
func (*EngineService) Stop ¶
func (e *EngineService) Stop() error
type ExecutorService ¶
type ExecutorService struct {
ExecContractFn func(ctx context.Context, opt service.ContractCallOpt) (res interface{}, err error)
}
func (*ExecutorService) ExecContract ¶
func (e *ExecutorService) ExecContract(ctx context.Context, opt service.ContractCallOpt) (res interface{}, err error)
type FuelMonitorService ¶ added in v0.0.8
type FuelMonitorService struct { StartMonitoringFn func(ctx context.Context) error StopMonitoringFn func(ctx context.Context) error }
func (*FuelMonitorService) StartMonitoring ¶ added in v0.0.8
func (fm *FuelMonitorService) StartMonitoring(ctx context.Context) error
func (*FuelMonitorService) StopMonitoring ¶ added in v0.0.8
func (fm *FuelMonitorService) StopMonitoring(ctx context.Context) error
type FuelMonitorServiceNoOp ¶ added in v0.0.8
type FuelMonitorServiceNoOp struct { StartMonitoringFn func(ctx context.Context) error StopMonitoringFn func(ctx context.Context) error }
func (*FuelMonitorServiceNoOp) StartMonitoring ¶ added in v0.0.8
func (fm *FuelMonitorServiceNoOp) StartMonitoring(ctx context.Context) error
func (*FuelMonitorServiceNoOp) StopMonitoring ¶ added in v0.0.8
func (fm *FuelMonitorServiceNoOp) StopMonitoring(ctx context.Context) error
type FuelStationService ¶
type FuelStationService struct { IsRunningFn func() bool ResumeRefuelingFn func(ctx context.Context) error StopRefuelingFn func(ctx context.Context) error }
func (*FuelStationService) IsRunning ¶
func (fs *FuelStationService) IsRunning() bool
func (*FuelStationService) ResumeRefueling ¶
func (fs *FuelStationService) ResumeRefueling(ctx context.Context) error
func (*FuelStationService) StopRefueling ¶
func (fs *FuelStationService) StopRefueling(ctx context.Context) error
type FuelTankService ¶
type FuelTankService struct { BurnFn func(ctx context.Context, fuel entity.Fuel) error FuelFn func(ctx context.Context) (entity.Fuel, error) RefuelFn func(ctx context.Context, fuelToRefill entity.Fuel) error StatsFn func(ctx context.Context) (*entity.FuelStat, error) }
type FuelTankServiceNoOp ¶
type FuelTankServiceNoOp struct{}
type JWTBlacklistService ¶
type JWTBlacklistService struct { InvalidateFn func(ctx context.Context, token string, expiration time.Duration) error IsBlacklistedFn func(ctx context.Context, token string) (bool, error) }
func (*JWTBlacklistService) Invalidate ¶
func (*JWTBlacklistService) IsBlacklisted ¶
type JWTService ¶
type JWTService struct { ExchangeFn func(ctx context.Context, auth *entity.Auth) (*entity.TokenPair, error) InvalidateFn func(ctx context.Context, token string, expiration time.Duration) error ParseFn func(ctx context.Context, token string) (*entity.AppClaims, error) RefreshFn func(ctx context.Context, refreshToken string) (*entity.TokenPair, error) }
func (*JWTService) Invalidate ¶
type LockService ¶
type LockService struct { LockContextFn func(ctx context.Context) error NameFn func() string UnlockContextFn func(ctx context.Context) (bool, error) }
func (*LockService) LockContext ¶
func (ls *LockService) LockContext(ctx context.Context) error
func (*LockService) Name ¶
func (ls *LockService) Name() string
func (*LockService) UnlockContext ¶
func (ls *LockService) UnlockContext(ctx context.Context) (bool, error)
type Logger ¶ added in v0.0.7
type Logger struct { CritFn func(msg string, ctx ...interface{}) DebugFn func(msg string, ctx ...interface{}) ErrorFn func(msg string, ctx ...interface{}) GetHandlerFn func() log15.Handler InfoFn func(msg string, ctx ...interface{}) NewFn func(ctx ...interface{}) log15.Logger SetHandlerFn func(h log15.Handler) WarnFn func(msg string, ctx ...interface{}) }
func (*Logger) GetHandler ¶ added in v0.0.7
func (*Logger) SetHandler ¶ added in v0.0.7
type LoggerNoOp ¶ added in v0.0.7
type LoggerNoOp struct { CritFn func(msg string, ctx ...interface{}) DebugFn func(msg string, ctx ...interface{}) ErrorFn func(msg string, ctx ...interface{}) InfoFn func(msg string, ctx ...interface{}) WarnFn func(msg string, ctx ...interface{}) }
func (*LoggerNoOp) Crit ¶ added in v0.0.7
func (l *LoggerNoOp) Crit(msg string, ctx ...interface{})
func (*LoggerNoOp) Debug ¶ added in v0.0.7
func (l *LoggerNoOp) Debug(msg string, ctx ...interface{})
func (*LoggerNoOp) Error ¶ added in v0.0.7
func (l *LoggerNoOp) Error(msg string, ctx ...interface{})
func (*LoggerNoOp) GetHandler ¶ added in v0.0.7
func (l *LoggerNoOp) GetHandler() log15.Handler
func (*LoggerNoOp) Info ¶ added in v0.0.7
func (l *LoggerNoOp) Info(msg string, ctx ...interface{})
func (*LoggerNoOp) New ¶ added in v0.0.7
func (l *LoggerNoOp) New(ctx ...interface{}) log15.Logger
func (*LoggerNoOp) SetHandler ¶ added in v0.0.7
func (l *LoggerNoOp) SetHandler(h log15.Handler)
func (*LoggerNoOp) Warn ¶ added in v0.0.7
func (l *LoggerNoOp) Warn(msg string, ctx ...interface{})
type StateCacheService ¶ added in v0.0.7
func (*StateCacheService) CacheState ¶ added in v0.0.7
type StateService ¶ added in v0.0.7
type StateService struct { FindStateByRevisionIDFn func(ctx context.Context, revisionID int64) (*entity.State, error) CreateStateFn func(ctx context.Context, state *entity.State) error UpdateStateFn func(ctx context.Context, revisionID int64, value entity.StateValue) (*entity.State, error) }
func (*StateService) CreateState ¶ added in v0.0.7
func (*StateService) FindStateByRevisionID ¶ added in v0.0.7
func (*StateService) UpdateState ¶ added in v0.0.7
func (s *StateService) UpdateState(ctx context.Context, revisionID int64, value entity.StateValue) (*entity.State, error)
type UserService ¶
type UserService struct { CreateUserFn func(ctx context.Context, user *entity.User) error DeleteUserFn func(ctx context.Context, id int64) error FindUserByEmailFn func(ctx context.Context, email string) (*entity.User, error) FindUserByIDFn func(ctx context.Context, id int64) (*entity.User, error) FindUsersFn func(ctx context.Context, filter service.UserFilter) (entity.Users, int, error) UpdateUserFn func(ctx context.Context, id int64, user service.UserUpdate) (*entity.User, error) }
func (*UserService) CreateUser ¶
func (*UserService) DeleteUser ¶
func (s *UserService) DeleteUser(ctx context.Context, id int64) error
func (*UserService) FindUserByEmail ¶
func (*UserService) FindUserByID ¶
func (*UserService) FindUsers ¶
func (s *UserService) FindUsers(ctx context.Context, filter service.UserFilter) (entity.Users, int, error)
func (*UserService) UpdateUser ¶
func (s *UserService) UpdateUser(ctx context.Context, id int64, user service.UserUpdate) (*entity.User, error)
type VmCallableService ¶
type VmCallableService struct { *UserService *AuthService *FuelTankService *ContractService *ExecutorService }
Click to show internal directories.
Click to hide internal directories.