types

package
v1.2.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountFromContext added in v1.1.0

func AccountFromContext(ctx context.Context) (*models.Account, bool)

func AppletFromContext

func AppletFromContext(ctx context.Context) (*models.Applet, bool)

func ChainHeightFromContext added in v1.1.0

func ChainHeightFromContext(ctx context.Context) (*models.ChainHeight, bool)

func ChainTxFromContext added in v1.1.0

func ChainTxFromContext(ctx context.Context) (*models.ChainTx, bool)

func ContractLogFromContext added in v1.1.0

func ContractLogFromContext(ctx context.Context) (*models.ContractLog, bool)

func CronJobFromContext added in v1.1.0

func CronJobFromContext(ctx context.Context) (*models.CronJob, bool)

func EventIDFromContext added in v1.2.2

func EventIDFromContext(ctx context.Context) (string, bool)

func FileSystemOpFromContext added in v1.1.0

func FileSystemOpFromContext(ctx context.Context) (filesystem.FileSystemOp, bool)

func InstanceFromContext

func InstanceFromContext(ctx context.Context) (*models.Instance, bool)

func LoggerFromContext

func LoggerFromContext(ctx context.Context) (log.Logger, bool)

func MgrDBExecutorFromContext added in v1.0.0

func MgrDBExecutorFromContext(ctx context.Context) (sqlx.DBExecutor, bool)

func MonitorDBExecutorFromContext

func MonitorDBExecutorFromContext(ctx context.Context) (sqlx.DBExecutor, bool)

func MqttBrokerFromContext

func MqttBrokerFromContext(ctx context.Context) (*mqtt.Broker, bool)

func MustAccountFromContext added in v1.1.0

func MustAccountFromContext(ctx context.Context) *models.Account

func MustAppletFromContext

func MustAppletFromContext(ctx context.Context) *models.Applet

func MustChainHeightFromContext added in v1.1.0

func MustChainHeightFromContext(ctx context.Context) *models.ChainHeight

func MustChainTxFromContext added in v1.1.0

func MustChainTxFromContext(ctx context.Context) *models.ChainTx

func MustContractLogFromContext added in v1.1.0

func MustContractLogFromContext(ctx context.Context) *models.ContractLog

func MustCronJobFromContext added in v1.1.0

func MustCronJobFromContext(ctx context.Context) *models.CronJob

func MustEventIDFromContext added in v1.2.2

func MustEventIDFromContext(ctx context.Context) string

func MustFileSystemOpFromContext added in v1.1.0

func MustFileSystemOpFromContext(ctx context.Context) filesystem.FileSystemOp

func MustInstanceFromContext

func MustInstanceFromContext(ctx context.Context) *models.Instance

func MustLoggerFromContext

func MustLoggerFromContext(ctx context.Context) log.Logger

func MustMgrDBExecutorFromContext added in v1.0.0

func MustMgrDBExecutorFromContext(ctx context.Context) sqlx.DBExecutor

func MustMonitorDBExecutorFromContext

func MustMonitorDBExecutorFromContext(ctx context.Context) sqlx.DBExecutor

func MustMqttBrokerFromContext

func MustMqttBrokerFromContext(ctx context.Context) *mqtt.Broker

func MustOperatorFromContext added in v1.1.0

func MustOperatorFromContext(ctx context.Context) *models.Operator

func MustProjectFromContext

func MustProjectFromContext(ctx context.Context) *models.Project

func MustProxyClientFromContext added in v1.1.0

func MustProxyClientFromContext(ctx context.Context) *client.Client

func MustPublisherFromContext added in v1.1.0

func MustPublisherFromContext(ctx context.Context) *models.Publisher

func MustRedisEndpointFromContext added in v1.0.0

func MustRedisEndpointFromContext(ctx context.Context) *redis.Redis

func MustResourceFromContext added in v1.0.0

func MustResourceFromContext(ctx context.Context) *models.Resource

func MustResourceOwnershipFromContext added in v1.1.0

func MustResourceOwnershipFromContext(ctx context.Context) *models.ResourceOwnership

func MustStrategyFromContext added in v1.1.0

func MustStrategyFromContext(ctx context.Context) *models.Strategy

func MustTaskBoardFromContext

func MustTaskBoardFromContext(ctx context.Context) *mq.TaskBoard

func MustTaskWorkerFromContext

func MustTaskWorkerFromContext(ctx context.Context) *mq.TaskWorker

func MustTrafficLimitFromContext added in v1.2.5

func MustTrafficLimitFromContext(ctx context.Context) *models.TrafficLimit

func MustWasmDBEndpointFromContext added in v1.1.0

func MustWasmDBEndpointFromContext(ctx context.Context) *types.Endpoint

func OperatorFromContext added in v1.1.0

func OperatorFromContext(ctx context.Context) (*models.Operator, bool)

func ProjectFromContext

func ProjectFromContext(ctx context.Context) (*models.Project, bool)

func ProxyClientFromContext added in v1.1.0

func ProxyClientFromContext(ctx context.Context) (*client.Client, bool)

func PublisherFromContext added in v1.1.0

func PublisherFromContext(ctx context.Context) (*models.Publisher, bool)

func RedisEndpointFromContext added in v1.0.0

func RedisEndpointFromContext(ctx context.Context) (*redis.Redis, bool)

func ResourceFromContext added in v1.0.0

func ResourceFromContext(ctx context.Context) (*models.Resource, bool)

func ResourceOwnershipFromContext added in v1.1.0

func ResourceOwnershipFromContext(ctx context.Context) (*models.ResourceOwnership, bool)

func StrategyFromContext added in v1.1.0

func StrategyFromContext(ctx context.Context) (*models.Strategy, bool)

func TaskBoardFromContext

func TaskBoardFromContext(ctx context.Context) (*mq.TaskBoard, bool)

func TaskWorkerFromContext

func TaskWorkerFromContext(ctx context.Context) (*mq.TaskWorker, bool)

func TrafficLimitFromContext added in v1.2.5

func TrafficLimitFromContext(ctx context.Context) (*models.TrafficLimit, bool)

func WasmDBEndpointFromContext added in v1.1.0

func WasmDBEndpointFromContext(ctx context.Context) (*types.Endpoint, bool)

func WithAccount added in v1.1.0

func WithAccount(ctx context.Context, v *models.Account) context.Context

func WithAccountContext added in v1.1.0

func WithAccountContext(v *models.Account) contextx.WithContext

func WithApplet

func WithApplet(ctx context.Context, a *models.Applet) context.Context

func WithAppletContext

func WithAppletContext(a *models.Applet) contextx.WithContext

func WithChainHeight added in v1.1.0

func WithChainHeight(ctx context.Context, v *models.ChainHeight) context.Context

func WithChainHeightContext added in v1.1.0

func WithChainHeightContext(v *models.ChainHeight) contextx.WithContext

func WithChainTx added in v1.1.0

func WithChainTx(ctx context.Context, v *models.ChainTx) context.Context

func WithChainTxContext added in v1.1.0

func WithChainTxContext(v *models.ChainTx) contextx.WithContext

func WithContractLog added in v1.1.0

func WithContractLog(ctx context.Context, v *models.ContractLog) context.Context

func WithContractLogContext added in v1.1.0

func WithContractLogContext(v *models.ContractLog) contextx.WithContext

func WithCronJob added in v1.1.0

func WithCronJob(ctx context.Context, v *models.CronJob) context.Context

func WithCronJobContext added in v1.1.0

func WithCronJobContext(v *models.CronJob) contextx.WithContext

func WithETHClientConfig

func WithETHClientConfig(ctx context.Context, v *ETHClientConfig) context.Context

func WithETHClientConfigContext

func WithETHClientConfigContext(v *ETHClientConfig) contextx.WithContext

func WithEventID added in v1.2.2

func WithEventID(ctx context.Context, v string) context.Context

func WithEventIDContext added in v1.2.2

func WithEventIDContext(v string) contextx.WithContext

func WithFileSystemOp added in v1.1.0

func WithFileSystemOp(ctx context.Context, v filesystem.FileSystemOp) context.Context

func WithFileSystemOpContext added in v1.1.0

func WithFileSystemOpContext(v filesystem.FileSystemOp) contextx.WithContext

func WithInstance

func WithInstance(ctx context.Context, i *models.Instance) context.Context

func WithInstanceContext

func WithInstanceContext(i *models.Instance) contextx.WithContext

func WithLogger

func WithLogger(ctx context.Context, v log.Logger) context.Context

func WithLoggerContext

func WithLoggerContext(v log.Logger) contextx.WithContext

func WithMetricsCenterConfig added in v1.2.2

func WithMetricsCenterConfig(ctx context.Context, v *MetricsCenterConfig) context.Context

func WithMetricsCenterConfigContext added in v1.2.2

func WithMetricsCenterConfigContext(v *MetricsCenterConfig) contextx.WithContext

func WithMgrDBExecutor added in v1.0.0

func WithMgrDBExecutor(ctx context.Context, v sqlx.DBExecutor) context.Context

func WithMgrDBExecutorContext added in v1.0.0

func WithMgrDBExecutorContext(v sqlx.DBExecutor) contextx.WithContext

func WithMonitorDBExecutor

func WithMonitorDBExecutor(ctx context.Context, v sqlx.DBExecutor) context.Context

func WithMonitorDBExecutorContext

func WithMonitorDBExecutorContext(v sqlx.DBExecutor) contextx.WithContext

func WithMqttBroker

func WithMqttBroker(ctx context.Context, v *mqtt.Broker) context.Context

func WithMqttBrokerContext

func WithMqttBrokerContext(v *mqtt.Broker) contextx.WithContext

func WithOperator added in v1.1.0

func WithOperator(ctx context.Context, v *models.Operator) context.Context

func WithOperatorContext added in v1.1.0

func WithOperatorContext(v *models.Operator) contextx.WithContext

func WithProject

func WithProject(ctx context.Context, p *models.Project) context.Context

func WithProjectContext

func WithProjectContext(p *models.Project) contextx.WithContext

func WithProxyClient added in v1.1.0

func WithProxyClient(ctx context.Context, v *client.Client) context.Context

func WithProxyClientContext added in v1.1.0

func WithProxyClientContext(v *client.Client) contextx.WithContext

func WithPublisher added in v1.1.0

func WithPublisher(ctx context.Context, v *models.Publisher) context.Context

func WithPublisherContext added in v1.1.0

func WithPublisherContext(v *models.Publisher) contextx.WithContext

func WithRedis added in v1.1.0

func WithRedis(ctx context.Context, v *redis.Redis) context.Context

func WithRedisEndpointContext added in v1.0.0

func WithRedisEndpointContext(v *redis.Redis) contextx.WithContext

func WithResource added in v1.0.0

func WithResource(ctx context.Context, r *models.Resource) context.Context

func WithResourceContext added in v1.0.0

func WithResourceContext(r *models.Resource) contextx.WithContext

func WithResourceOwnership added in v1.1.0

func WithResourceOwnership(ctx context.Context, o *models.ResourceOwnership) context.Context

func WithResourceOwnershipContext added in v1.1.0

func WithResourceOwnershipContext(o *models.ResourceOwnership) contextx.WithContext

func WithRobotNotifierConfig added in v1.2.3

func WithRobotNotifierConfig(ctx context.Context, v *RobotNotifierConfig) context.Context

func WithRobotNotifierConfigContext added in v1.2.3

func WithRobotNotifierConfigContext(v *RobotNotifierConfig) contextx.WithContext

func WithStrategy added in v1.1.0

func WithStrategy(ctx context.Context, v *models.Strategy) context.Context

func WithStrategyContext added in v1.1.0

func WithStrategyContext(v *models.Strategy) contextx.WithContext

func WithStrategyResults added in v1.1.0

func WithStrategyResults(ctx context.Context, v []*StrategyResult) context.Context

func WithStrategyResultsContext added in v1.1.0

func WithStrategyResultsContext(v []*StrategyResult) contextx.WithContext

func WithTaskBoard

func WithTaskBoard(ctx context.Context, tb *mq.TaskBoard) context.Context

func WithTaskBoardContext

func WithTaskBoardContext(tb *mq.TaskBoard) contextx.WithContext

func WithTaskWorker

func WithTaskWorker(ctx context.Context, tw *mq.TaskWorker) context.Context

func WithTaskWorkerContext

func WithTaskWorkerContext(tw *mq.TaskWorker) contextx.WithContext

func WithTrafficLimit added in v1.2.5

func WithTrafficLimit(ctx context.Context, r *models.TrafficLimit) context.Context

func WithTrafficLimitContext added in v1.2.5

func WithTrafficLimitContext(r *models.TrafficLimit) contextx.WithContext

func WithUploadConfig

func WithUploadConfig(ctx context.Context, v *UploadConfig) context.Context

func WithUploadConfigContext

func WithUploadConfigContext(v *UploadConfig) contextx.WithContext

func WithWasmDBConfig added in v1.2.2

func WithWasmDBConfig(ctx context.Context, v *WasmDBConfig) context.Context

func WithWasmDBConfigContext added in v1.2.2

func WithWasmDBConfigContext(v *WasmDBConfig) contextx.WithContext

func WithWasmDBEndpoint added in v1.1.0

func WithWasmDBEndpoint(ctx context.Context, v *types.Endpoint) context.Context

func WithWasmDBEndpointContext added in v1.1.0

func WithWasmDBEndpointContext(v *types.Endpoint) contextx.WithContext

func WithWhiteList added in v1.1.0

func WithWhiteList(ctx context.Context, v *WhiteList) context.Context

func WithWhiteListContext added in v1.1.0

func WithWhiteListContext(v *WhiteList) contextx.WithContext

Types

type ChainHeight added in v1.1.0

type ChainHeight struct{}

type ChainTx added in v1.1.0

type ChainTx struct{}

type ContractLog added in v1.1.0

type ContractLog struct{}

type CtxAccount added in v1.1.0

type CtxAccount struct{}

type CtxApplet

type CtxApplet struct{}

type CtxCronJob added in v1.1.0

type CtxCronJob struct{}

type CtxEthClient

type CtxEthClient struct{} // CtxEthClient ETHClientConfig

type CtxEventID added in v1.2.2

type CtxEventID struct{}

type CtxFileSystem added in v1.1.0

type CtxFileSystem struct{}

type CtxFileSystemOp added in v1.1.0

type CtxFileSystemOp struct{}

type CtxInstance

type CtxInstance struct{}

type CtxLogger

type CtxLogger struct{} // CtxLogger log.Logger

type CtxMetricsCenterConfig added in v1.2.2

type CtxMetricsCenterConfig struct{}

type CtxMgrDBExecutor added in v1.0.0

type CtxMgrDBExecutor struct{} // CtxMgrDBExecutor sqlx.DBExecutor

type CtxMonitorDBExecutor

type CtxMonitorDBExecutor struct{} // CtxMonitorDBExecutor sqlx.DBExecutor

type CtxMqttBroker

type CtxMqttBroker struct{} // CtxMqttBroker mqtt.Broker

type CtxOperator added in v1.1.0

type CtxOperator struct{}

type CtxProject

type CtxProject struct{}

type CtxProxyClient added in v1.1.0

type CtxProxyClient struct{}

type CtxPublisher added in v1.1.0

type CtxPublisher struct{}

type CtxRedisEndpoint added in v1.0.0

type CtxRedisEndpoint struct{} // CtxRedisEndpoint redis.Redis

type CtxResource added in v1.0.0

type CtxResource struct{}

type CtxResourceOwnership added in v1.1.0

type CtxResourceOwnership struct{}

type CtxRobotNotifierConfig added in v1.2.3

type CtxRobotNotifierConfig struct{} // CtxRobotNotifierConfig for notify service level message to maintainers.

type CtxStrategy added in v1.1.0

type CtxStrategy struct{}

type CtxStrategyResults added in v1.1.0

type CtxStrategyResults struct{}

type CtxTaskBoard

type CtxTaskBoard struct{}

type CtxTaskWorker

type CtxTaskWorker struct{}

type CtxTrafficLimit added in v1.2.5

type CtxTrafficLimit struct{}

type CtxUploadConfig

type CtxUploadConfig struct{} // CtxUploadConfig UploadConfig

type CtxWasmDBConfig added in v1.2.2

type CtxWasmDBConfig struct{} // CtxWasmDBConfig wasm database config

type CtxWasmDBEndpoint added in v1.1.0

type CtxWasmDBEndpoint struct{} // CtxWasmDBEndpoint sqlx.DBExecutor

type CtxWhiteList added in v1.1.0

type CtxWhiteList struct{}

type ETHClientConfig

type ETHClientConfig struct {
	Endpoints string            `env:""`
	Clients   map[uint32]string `env:"-"`
}

func ETHClientConfigFromContext

func ETHClientConfigFromContext(ctx context.Context) (*ETHClientConfig, bool)

func MustETHClientConfigFromContext

func MustETHClientConfigFromContext(ctx context.Context) *ETHClientConfig

func (*ETHClientConfig) Init added in v1.2.4

func (c *ETHClientConfig) Init()

type EthAddress added in v1.1.0

type EthAddress = types.EthAddress

aliases from base/types

type FileSystem added in v1.1.0

type FileSystem struct {
	Type enums.FileSystemMode `env:""`
}

func (*FileSystem) SetDefault added in v1.1.0

func (f *FileSystem) SetDefault()

type Initializer added in v1.1.0

type Initializer = types.Initializer

aliases from base/types

type InitializerWith added in v1.1.0

type InitializerWith = types.InitializerWith

aliases from base/types

type MetricsCenterConfig added in v1.2.2

type MetricsCenterConfig struct {
	Endpoint string `env:""`
}

func MetricsCenterConfigFromContext added in v1.2.2

func MetricsCenterConfigFromContext(ctx context.Context) (*MetricsCenterConfig, bool)

func MustMetricsCenterConfigFromContext added in v1.2.2

func MustMetricsCenterConfigFromContext(ctx context.Context) *MetricsCenterConfig

type RobotNotifierConfig added in v1.2.3

type RobotNotifierConfig struct {
	Vendor string   `env:""` // Vendor robot vendor eg: `Lark` `Wechat Work` `DingTalk`
	Env    string   `env:""` // Env Service env, eg: dev-staging, prod
	URL    string   `env:""` // URL webhook url
	Secret string   `env:""` // Secret message secret
	PINs   []string `env:""` // PINs pin someone

	SignFn func(int64) (string, error) `env:"-"`
}

func MustRobotNotifierConfigFromContext added in v1.2.3

func MustRobotNotifierConfigFromContext(ctx context.Context) *RobotNotifierConfig

func RobotNotifierConfigFromContext added in v1.2.3

func RobotNotifierConfigFromContext(ctx context.Context) (*RobotNotifierConfig, bool)

func (*RobotNotifierConfig) Init added in v1.2.3

func (c *RobotNotifierConfig) Init()

func (*RobotNotifierConfig) IsZero added in v1.2.3

func (c *RobotNotifierConfig) IsZero() bool

type SFID

type SFID = types.SFID

aliases from base/types

type SFIDs

type SFIDs = types.SFIDs

aliases from base/types

type StrategyResult added in v1.1.0

type StrategyResult struct {
	ProjectName string     `json:"projectName" db:"f_prj_name"`
	AppletID    types.SFID `json:"appletID"    db:"f_app_id"`
	AppletName  string     `json:"appletName"  db:"f_app_name"`
	InstanceID  types.SFID `json:"instanceID"  db:"f_ins_id"`
	Handler     string     `json:"handler"     db:"f_hdl"`
	EventType   string     `json:"eventType"   db:"f_evt"`
}

func MustStrategyResultsFromContext added in v1.1.0

func MustStrategyResultsFromContext(ctx context.Context) []*StrategyResult

func StrategyResultsFromContext added in v1.1.0

func StrategyResultsFromContext(ctx context.Context) ([]*StrategyResult, bool)

type Timestamp added in v1.1.0

type Timestamp = types.Timestamp

aliases from base/types

type UploadConfig

type UploadConfig struct {
	FilesizeLimitBytes int64 `env:""`
	DiskReserveBytes   int64 `env:""`
}

func MustUploadConfigFromContext

func MustUploadConfigFromContext(ctx context.Context) *UploadConfig

func UploadConfigFromContext

func UploadConfigFromContext(ctx context.Context) (*UploadConfig, bool)

func (*UploadConfig) SetDefault

func (c *UploadConfig) SetDefault()

type ValidatedInitializer added in v1.1.0

type ValidatedInitializer = types.ValidatedInitializer

aliases from base/types

type ValidatedInitializerWith added in v1.1.0

type ValidatedInitializerWith = types.ValidatedInitializerWith

aliases from base/types

type WasmDBConfig added in v1.2.2

type WasmDBConfig struct {
	MaxConnection int
}

func MustWasmDBConfigFromContext added in v1.2.2

func MustWasmDBConfigFromContext(ctx context.Context) *WasmDBConfig

func WasmDBConfigFromContext added in v1.2.2

func WasmDBConfigFromContext(ctx context.Context) (*WasmDBConfig, bool)

func (*WasmDBConfig) SetDefault added in v1.2.2

func (c *WasmDBConfig) SetDefault()

type WhiteList added in v1.1.0

type WhiteList []string

func MustWhiteListFromContext added in v1.1.0

func MustWhiteListFromContext(ctx context.Context) *WhiteList

func WhiteListFromContext added in v1.1.0

func WhiteListFromContext(ctx context.Context) (*WhiteList, bool)

func (*WhiteList) Init added in v1.1.0

func (v *WhiteList) Init()

func (*WhiteList) Validate added in v1.1.0

func (v *WhiteList) Validate(address string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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