config

package
v0.0.0-...-c945685 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package config describes configuration used for command line tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxFromToolConfig

func CtxFromToolConfig(ctx context.Context, config *Config) context.Context

func SetConfig

func SetConfig(conf *Config) (sts status.S)

Types

type Config

type Config struct {
	// Pixur API server target
	PixurTarget          string          `protobuf:"bytes,1,opt,name=pixur_target,json=pixurTarget,proto3" json:"pixur_target,omitempty"`
	AuthToken            string          `protobuf:"bytes,2,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"`
	PixToken             string          `protobuf:"bytes,3,opt,name=pix_token,json=pixToken,proto3" json:"pix_token,omitempty"`
	AuthPayload          *api.PwtPayload `protobuf:"bytes,4,opt,name=auth_payload,json=authPayload,proto3" json:"auth_payload,omitempty"`
	PixPayload           *api.PwtPayload `protobuf:"bytes,5,opt,name=pix_payload,json=pixPayload,proto3" json:"pix_payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Config describes configuration used for command line tools.

func GetConfig

func GetConfig() (*Config, status.S)

func ToolConfigFromCtx

func ToolConfigFromCtx(ctx context.Context) (config *Config, ok bool)

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetAuthPayload

func (m *Config) GetAuthPayload() *api.PwtPayload

func (*Config) GetAuthToken

func (m *Config) GetAuthToken() string

func (*Config) GetPixPayload

func (m *Config) GetPixPayload() *api.PwtPayload

func (*Config) GetPixToken

func (m *Config) GetPixToken() string

func (*Config) GetPixurTarget

func (m *Config) GetPixurTarget() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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