cmd_contrib

package
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcServer

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

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 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

Types

type BaseOption

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

func CreateBaseOption

func CreateBaseOption() BaseOption

type ClientBaseOption

type ClientBaseOption struct {
	BaseOption                `mapstructure:",squash"`
	ListenOption              `mapstructure:",squash"`
	TransportCredentialOption `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 NewGrpcServerParams

type NewGrpcServerParams struct {
	fx.In

	Lis   net.Listener
	Creds credentials.TransportCredentials
}

type ServiceBaseOption

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

func CreateServiceBaseOption

func CreateServiceBaseOption() ServiceBaseOption

func (*ServiceBaseOption) GetStorage

func (self *ServiceBaseOption) GetStorage() StorageOptioner

func (*ServiceBaseOption) GetTransportCredential

func (self *ServiceBaseOption) GetTransportCredential() TransportCredentialOptioner

type ServiceEndpointOption

type ServiceEndpointOption struct {
	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 {
	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
}

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 TransportCredentialOption

type TransportCredentialOption struct {
	CertFile string
	KeyFile  string
}

func (*TransportCredentialOption) GetCertFile

func (self *TransportCredentialOption) GetCertFile() string

func (*TransportCredentialOption) GetCertFileP

func (self *TransportCredentialOption) GetCertFileP() *string

func (*TransportCredentialOption) GetKeyFile

func (self *TransportCredentialOption) GetKeyFile() string

func (*TransportCredentialOption) GetKeyFileP

func (self *TransportCredentialOption) GetKeyFileP() *string

func (*TransportCredentialOption) SetCertFile

func (self *TransportCredentialOption) SetCertFile(cert_file string)

func (*TransportCredentialOption) SetKeyFile

func (self *TransportCredentialOption) SetKeyFile(key_file string)

type TransportCredentialOptioner

type TransportCredentialOptioner interface {
	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
	ContentType string
	Secret      string
}

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