options

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppOption

type AppOption struct {
	Name string `json:"name" mapstructure:"name" yaml:"name"`
}

func NewAppOption

func NewAppOption() *AppOption

func (*AppOption) AddFlags

func (a *AppOption) AddFlags(fs *pflag.FlagSet)

func (*AppOption) Validate

func (a *AppOption) Validate() []error

type GrpcOption

type GrpcOption struct {
	Host string `json:"host" mapstructure:"host" yaml:"host"`
	Port int    `json:"port" mapstructure:"port" yaml:"port"`
}

func NewGrpcOption

func NewGrpcOption() *GrpcOption

func (*GrpcOption) AddFlags

func (g *GrpcOption) AddFlags(fs *pflag.FlagSet)

func (*GrpcOption) Validate

func (g *GrpcOption) Validate() []error

type HttpOption

type HttpOption struct {
	Host string `json:"host" mapstructure:"host" yaml:"host"`
	Port int    `json:"port" mapstructure:"port" yaml:"port"`
}

func NewHttpOption

func NewHttpOption() *HttpOption

func (*HttpOption) AddFlags

func (h *HttpOption) AddFlags(fs *pflag.FlagSet)

func (*HttpOption) Validate

func (h *HttpOption) Validate() []error

Jump to

Keyboard shortcuts

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