cmd_contrib

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientTransportCredentials added in v1.1.10

func NewClientTransportCredentials(opt TransportCredentialOptioner) (credentials.TransportCredentials, error)

func NewGrpcServer

func NewGrpcServer(params NewGrpcServerParams, lc fx.Lifecycle) *grpc.Server

func NewHttpServer added in v1.0.0

func NewHttpServer(params NewHttpServerParams, lc fx.Lifecycle) error

func NewListener

func NewListener(opt ListenOptioner) (net.Listener, error)

func NewLogger

func NewLogger(service string) func(LoggerOptioner) (log.FieldLogger, error)

func NewNoExpireTokener

func NewNoExpireTokener(opt CredentialOptioner, cli_fty *client_helper.ClientFactory) (tknr token_helper.Tokener, err error)

func NewServerTransportCredentials added in v1.1.10

func NewServerTransportCredentials(opt TransportCredentialOptioner) (credentials.TransportCredentials, error)

func NewTokener

func NewTokener(opt CredentialOptioner, cli_fty *client_helper.ClientFactory) (tknr token_helper.Tokener, err error)

func NewValidator

func NewValidator(logger log.FieldLogger) identityd_validator.Validator

func ProcessOutput added in v1.1.4

func ProcessOutput(o OutputOptioner, in interface{}) error

Types

type BaseOption

type BaseOption struct {
	ConfigOption              `mapstructure:",squash"`
	StageOption               `mapstructure:",squash"`
	VerboseOption             `mapstructure:",squash"`
	LoggerOption              `mapstructure:",squash"`
	CredentialOption          `mapstructure:",squash"`
	ServiceEndpointsOption    `mapstructure:",squash"`
	TransportCredentialOption `mapstructure:",squash"`
	TokenOption               `mapstructure:",squash"`
	OpentracingOption         `mapstructure:",squash"`
}

func CreateBaseOption

func CreateBaseOption() BaseOption

func (*BaseOption) GetTransportCredential added in v1.1.2

func (self *BaseOption) GetTransportCredential() TransportCredentialOptioner

type BinarySynchronizerOption added in v1.2.0

type BinarySynchronizerOption struct {
	fx.Out
	Option map[string]interface{} `name:"binary_synchronizer_option"`
}

type ClientBaseOption

type ClientBaseOption struct {
	BaseOption   `mapstructure:",squash"`
	ListenOption `mapstructure:",squash"`
	OutputOption `mapstructure:",squash"`
}

func CreateClientBaseOption

func CreateClientBaseOption() ClientBaseOption

type ConfigOption

type ConfigOption struct {
	Config string
}

func (*ConfigOption) GetConfig

func (self *ConfigOption) GetConfig() string

func (*ConfigOption) GetConfigP

func (self *ConfigOption) GetConfigP() *string

func (*ConfigOption) SetConfig

func (self *ConfigOption) SetConfig(cfg string)

type ConfigOptioner

type ConfigOptioner interface {
	GetConfigP() *string
	GetConfig() string
	SetConfig(string)
}

type CredentialOption

type CredentialOption struct {
	Credential struct {
		Domain string
		Id     string
		Secret string
	}
}

func (*CredentialOption) GetCredentialDomain

func (self *CredentialOption) GetCredentialDomain() string

func (*CredentialOption) GetCredentialDomainP

func (self *CredentialOption) GetCredentialDomainP() *string

func (*CredentialOption) GetCredentialId

func (self *CredentialOption) GetCredentialId() string

func (*CredentialOption) GetCredentialIdP

func (self *CredentialOption) GetCredentialIdP() *string

func (*CredentialOption) GetCredentialSecret

func (self *CredentialOption) GetCredentialSecret() string

func (*CredentialOption) GetCredentialSecretP

func (self *CredentialOption) GetCredentialSecretP() *string

func (*CredentialOption) SetCredentialDomain

func (self *CredentialOption) SetCredentialDomain(dom string)

func (*CredentialOption) SetCredentialId

func (self *CredentialOption) SetCredentialId(id string)

func (*CredentialOption) SetCredentialSecret

func (self *CredentialOption) SetCredentialSecret(srt string)

type CredentialOptioner

type CredentialOptioner interface {
	GetCredentialDomainP() *string
	GetCredentialDomain() string
	SetCredentialDomain(string)

	GetCredentialIdP() *string
	GetCredentialId() string
	SetCredentialId(string)

	GetCredentialSecretP() *string
	GetCredentialSecret() string
	SetCredentialSecret(string)
}

type GetStorageOptioner

type GetStorageOptioner interface {
	GetStorage() StorageOptioner
}

type GetTransportCredentialOptioner

type GetTransportCredentialOptioner interface {
	GetTransportCredential() TransportCredentialOptioner
}

type HeartbeatOption

type HeartbeatOption struct {
	Interval int
}

func (*HeartbeatOption) GetInterval

func (self *HeartbeatOption) GetInterval() int

func (*HeartbeatOption) GetIntervalP

func (self *HeartbeatOption) GetIntervalP() *int

func (*HeartbeatOption) SetInterval

func (self *HeartbeatOption) SetInterval(ivt int)

type HeartbeatOptioner

type HeartbeatOptioner interface {
	GetIntervalP() *int
	GetInterval() int
	SetInterval(int)
}

type ListenOption

type ListenOption struct {
	Listen string
}

func (*ListenOption) GetListen

func (self *ListenOption) GetListen() string

func (*ListenOption) GetListenP

func (self *ListenOption) GetListenP() *string

func (*ListenOption) SetListen

func (self *ListenOption) SetListen(lis string)

type ListenOptioner

type ListenOptioner interface {
	GetListenP() *string
	GetListen() string
	SetListen(string)
}

type LoggerOption

type LoggerOption struct {
	Log struct {
		Level string
	}
}

func (*LoggerOption) GetLevel

func (self *LoggerOption) GetLevel() string

func (*LoggerOption) GetLevelP

func (self *LoggerOption) GetLevelP() *string

func (*LoggerOption) SetLevel

func (self *LoggerOption) SetLevel(lvl string)

type LoggerOptioner

type LoggerOptioner interface {
	GetLevelP() *string
	GetLevel() string
	SetLevel(string)
}

type ModuleBaseOption

type ModuleBaseOption struct {
	BaseOption                `mapstructure:",squash"`
	NameOption                `mapstructure:",squash"`
	ListenOption              `mapstructure:",squash"`
	TransportCredentialOption `mapstructure:",squash"`
}

func CreateModuleBaseOption

func CreateModuleBaseOption() ModuleBaseOption

type NameOption

type NameOption struct {
	Name string `mapstructure:"name"`
}

func (*NameOption) GetName

func (self *NameOption) GetName() string

func (*NameOption) GetNameP

func (self *NameOption) GetNameP() *string

func (*NameOption) SetName

func (self *NameOption) SetName(name string)

type NameOptioner

type NameOptioner interface {
	GetNameP() *string
	GetName() string
	SetName(string)
}

type NewBinarySynchronizerParams added in v1.2.0

type NewBinarySynchronizerParams struct {
	fx.In

	Logger log.FieldLogger
	Option map[string]interface{} `name:"binary_synchronizer_option"`
}

type NewClientFactoryParams added in v1.1.18

type NewClientFactoryParams struct {
	fx.In

	Endpoints ServiceEndpointsOptioner
	Logger    log.FieldLogger
	Tracer    opentracing.Tracer `name:"opentracing_tracer" optional:"true"`
}

type NewGrpcServerParams

type NewGrpcServerParams struct {
	fx.In

	Lis    net.Listener
	Creds  credentials.TransportCredentials
	Logger log.FieldLogger
	Tracer opentracing.Tracer `name:"opentracing_tracer" optional:"true"`
	Closer io.Closer          `name:"opentracing_closer" optional:"true"`
}

type NewHttpServerParams added in v1.0.0

type NewHttpServerParams struct {
	fx.In

	Lis    net.Listener
	Logger log.FieldLogger
	Router *mux.Router
	Tracer opentracing.Tracer `name:"opentracing_tracer" optional:"true"`
	Closer io.Closer          `name:"opentracing_closer" optional:"true"`
}

type OpentracingOption added in v1.1.18

type OpentracingOption struct {
	Opentracing map[string]interface{} `mapstructure:"opentracing"`
}

func (*OpentracingOption) GetData added in v1.1.18

func (o *OpentracingOption) GetData() map[string]interface{}

func (*OpentracingOption) GetTracer added in v1.1.18

func (o *OpentracingOption) GetTracer() string

func (*OpentracingOption) SetTracer added in v1.1.18

func (o *OpentracingOption) SetTracer(tr string)

type OpentracingOptioner added in v1.1.18

type OpentracingOptioner interface {
	GetTracer() string
	SetTracer(string)

	GetData() map[string]interface{}
}

type OpentracingResult added in v1.1.18

type OpentracingResult struct {
	fx.Out

	Tracer opentracing.Tracer `name:"opentracing_tracer"`
	Closer io.Closer          `name:"opentracing_closer"`
}

func NewOpentracing added in v1.1.18

func NewOpentracing(srv_opt ServiceOptioner, opt OpentracingOptioner) (OpentracingResult, error)

type OutputOption added in v1.1.4

type OutputOption struct {
	Output string
}

func (*OutputOption) GetOutput added in v1.1.4

func (self *OutputOption) GetOutput() string

func (*OutputOption) GetOutputP added in v1.1.4

func (self *OutputOption) GetOutputP() *string

func (*OutputOption) SetOutput added in v1.1.4

func (self *OutputOption) SetOutput(o string)

type OutputOptioner added in v1.1.4

type OutputOptioner interface {
	GetOutputP() *string
	GetOutput() string
	SetOutput(string)
}

type ServiceBaseOption

type ServiceBaseOption struct {
	BaseOption           `mapstructure:",squash"`
	ServiceOption        `mapstructure:",squash"`
	ListenOption         `mapstructure:",squash"`
	StorageOption        `mapstructure:",squash"`
	WebhookServiceOption `mapstructure:",squash"`
}

func CreateServiceBaseOption

func CreateServiceBaseOption() ServiceBaseOption

func (*ServiceBaseOption) GetStorage

func (self *ServiceBaseOption) GetStorage() StorageOptioner

type ServiceEndpointOption

type ServiceEndpointOption struct {
	TransportCredentialOption `mapstructure:",squash"`
	Address                   string
}

func (*ServiceEndpointOption) GetAddress

func (self *ServiceEndpointOption) GetAddress() string

func (*ServiceEndpointOption) GetAddressP

func (self *ServiceEndpointOption) GetAddressP() *string

func (*ServiceEndpointOption) SetAddress

func (self *ServiceEndpointOption) SetAddress(addr string)

type ServiceEndpointOptioner

type ServiceEndpointOptioner interface {
	TransportCredentialOptioner
	GetAddressP() *string
	GetAddress() string
	SetAddress(string)
}

type ServiceEndpointsOption

type ServiceEndpointsOption struct {
	ServiceEndpoint map[string]*ServiceEndpointOption `mapstructure:"service_endpoint"`
}

func CreateServiceEndpointsOption

func CreateServiceEndpointsOption() ServiceEndpointsOption

func (*ServiceEndpointsOption) GetServiceEndpoint

func (self *ServiceEndpointsOption) GetServiceEndpoint(srv interface{}) ServiceEndpointOptioner

type ServiceEndpointsOptioner

type ServiceEndpointsOptioner interface {
	GetServiceEndpoint(interface{}) ServiceEndpointOptioner
}

func NewServiceEndpointsOptionWithTransportCredentialOption added in v1.1.14

func NewServiceEndpointsOptionWithTransportCredentialOption(x ServiceEndpointsOptioner, y TransportCredentialOptioner) ServiceEndpointsOptioner

type ServiceOption

type ServiceOption struct {
	ServiceName string `mapstructure:"service_name"`
}

func (*ServiceOption) GetServiceName

func (self *ServiceOption) GetServiceName() string

func (*ServiceOption) GetServiceNameP

func (self *ServiceOption) GetServiceNameP() *string

func (*ServiceOption) SetServiceName

func (self *ServiceOption) SetServiceName(srv_name string)

type ServiceOptioner

type ServiceOptioner interface {
	GetServiceNameP() *string
	GetServiceName() string
	SetServiceName(string)
}

type StageOption

type StageOption struct {
	Stage string
}

func (*StageOption) GetStage

func (self *StageOption) GetStage() string

func (*StageOption) GetStageP

func (self *StageOption) GetStageP() *string

func (*StageOption) SetStage

func (self *StageOption) SetStage(stage string)

type StageOptioner

type StageOptioner interface {
	GetStageP() *string
	GetStage() string
	SetStage(string)
}

type StorageOption

type StorageOption struct {
	Storage struct {
		Driver string
		Uri    string
	}
}

func (*StorageOption) GetDriver

func (self *StorageOption) GetDriver() string

func (*StorageOption) GetDriverP

func (self *StorageOption) GetDriverP() *string

func (*StorageOption) GetUri

func (self *StorageOption) GetUri() string

func (*StorageOption) GetUriP

func (self *StorageOption) GetUriP() *string

func (*StorageOption) SetDriver

func (self *StorageOption) SetDriver(drv string)

func (*StorageOption) SetUri

func (self *StorageOption) SetUri(uri string)

type StorageOptioner

type StorageOptioner interface {
	GetDriverP() *string
	GetDriver() string
	SetDriver(string)

	GetUriP() *string
	GetUri() string
	SetUri(string)
}

type TokenOption added in v1.1.16

type TokenOption struct {
	Token string
}

func (*TokenOption) GetToken added in v1.1.16

func (self *TokenOption) GetToken() string

func (*TokenOption) GetTokenP added in v1.1.16

func (self *TokenOption) GetTokenP() *string

func (*TokenOption) SetToken added in v1.1.16

func (self *TokenOption) SetToken(tkn string)

type TokenOptioner added in v1.1.16

type TokenOptioner interface {
	GetTokenP() *string
	GetToken() string
	SetToken(string)
}

type TransportCredentialOption

type TransportCredentialOption struct {
	Insecure  bool
	PlainText bool   `mapstructure:"plain_text"`
	CertFile  string `mapstructure:"cert_file"`
	KeyFile   string `mapstructure:"key_file"`
}

func (*TransportCredentialOption) GetCertFile

func (self *TransportCredentialOption) GetCertFile() string

func (*TransportCredentialOption) GetCertFileP

func (self *TransportCredentialOption) GetCertFileP() *string

func (*TransportCredentialOption) GetInsecure added in v1.1.2

func (self *TransportCredentialOption) GetInsecure() bool

func (*TransportCredentialOption) GetInsecureP added in v1.1.2

func (self *TransportCredentialOption) GetInsecureP() *bool

func (*TransportCredentialOption) GetKeyFile

func (self *TransportCredentialOption) GetKeyFile() string

func (*TransportCredentialOption) GetKeyFileP

func (self *TransportCredentialOption) GetKeyFileP() *string

func (*TransportCredentialOption) GetPlainText added in v1.1.2

func (self *TransportCredentialOption) GetPlainText() bool

func (*TransportCredentialOption) GetPlainTextP added in v1.1.2

func (self *TransportCredentialOption) GetPlainTextP() *bool

func (*TransportCredentialOption) SetCertFile

func (self *TransportCredentialOption) SetCertFile(cert_file string)

func (*TransportCredentialOption) SetInsecure added in v1.1.2

func (self *TransportCredentialOption) SetInsecure(insecure bool)

func (*TransportCredentialOption) SetKeyFile

func (self *TransportCredentialOption) SetKeyFile(key_file string)

func (*TransportCredentialOption) SetPlainText added in v1.1.2

func (self *TransportCredentialOption) SetPlainText(plaintext bool)

type TransportCredentialOptioner

type TransportCredentialOptioner interface {
	GetInsecureP() *bool
	GetInsecure() bool
	SetInsecure(bool)

	GetPlainTextP() *bool
	GetPlainText() bool
	SetPlainText(bool)

	GetCertFileP() *string
	GetCertFile() string
	SetCertFile(string)

	GetKeyFileP() *string
	GetKeyFile() string
	SetKeyFile(string)
}

type VerboseOption

type VerboseOption struct {
	Verbose bool
}

func (*VerboseOption) GetVerbose

func (self *VerboseOption) GetVerbose() bool

func (*VerboseOption) GetVerboseP

func (self *VerboseOption) GetVerboseP() *bool

func (*VerboseOption) SetVerbose

func (self *VerboseOption) SetVerbose(verbose bool)

type VerboseOptioner

type VerboseOptioner interface {
	GetVerboseP() *bool
	GetVerbose() bool
	SetVerbose(bool)
}

type WebhookOption

type WebhookOption struct {
	Url         string `mapstructure:"url"`
	ContentType string `mapstructure:"content_type"`
	Secret      string `mapstructure:"secret"`
}

func (*WebhookOption) GetContentType

func (o *WebhookOption) GetContentType() string

func (*WebhookOption) GetContentTypeP

func (o *WebhookOption) GetContentTypeP() *string

func (*WebhookOption) GetSecret

func (o *WebhookOption) GetSecret() string

func (*WebhookOption) GetSecretP

func (o *WebhookOption) GetSecretP() *string

func (*WebhookOption) GetUrl

func (o *WebhookOption) GetUrl() string

func (*WebhookOption) GetUrlP

func (o *WebhookOption) GetUrlP() *string

func (*WebhookOption) SetContentType

func (o *WebhookOption) SetContentType(v string)

func (*WebhookOption) SetSecret

func (o *WebhookOption) SetSecret(v string)

func (*WebhookOption) SetUrl

func (o *WebhookOption) SetUrl(v string)

type WebhookOptioner

type WebhookOptioner interface {
	GetContentTypeP() *string
	GetContentType() string
	SetContentType(string)

	GetUrlP() *string
	GetUrl() string
	SetUrl(string)

	GetSecretP() *string
	GetSecret() string
	SetSecret(string)
}

type WebhookServiceOption

type WebhookServiceOption struct {
	WebhookService map[string]*WebhookOption `mapstructure:"webhook_service"`
}

func CreateWebhookServiceOption

func CreateWebhookServiceOption() WebhookServiceOption

func (*WebhookServiceOption) GetWebhook

func (o *WebhookServiceOption) GetWebhook(v string) WebhookOptioner

func (*WebhookServiceOption) Keys

func (o *WebhookServiceOption) Keys() []string

type WebhookServiceOptioner

type WebhookServiceOptioner interface {
	GetWebhook(string) WebhookOptioner
	Keys() []string
}

Jump to

Keyboard shortcuts

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