config

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	UserID string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Configuration options. Exactly one of these fields should be set
	// (depending on which version of the config is being used)
	V1                   *ConfigV1 `protobuf:"bytes,2,opt,name=v1,proto3" json:"v1,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Config specifies the pachyderm config that is read and interpreted by the pachctl command-line tool. Right now, this is stored at $HOME/.pachyderm/config.

Different versions of the pachyderm config are specified as subfields of this message (this allows us to make significant changes to the config structure without breaking existing users by defining a new config version).

DO NOT change or remove field numbers from this proto, otherwise ALL pachyderm user configs will fail to parse.

func Read

func Read() (*Config, error)

Read loads the Pachyderm config on this machine. If an existing configuration cannot be found, it sets up the defaults. Read returns a nil Config if and only if it returns a non-nil error.

func (*Config) Descriptor

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

func (*Config) GetUserID added in v1.3.5

func (m *Config) GetUserID() string

func (*Config) GetV1 added in v1.5.0

func (m *Config) GetV1() *ConfigV1

func (*Config) Marshal added in v1.5.0

func (m *Config) Marshal() (dAtA []byte, err error)

func (*Config) MarshalTo added in v1.5.0

func (m *Config) MarshalTo(dAtA []byte) (int, error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) Size added in v1.5.0

func (m *Config) Size() (n int)

func (*Config) String

func (m *Config) String() string

func (*Config) Unmarshal added in v1.5.0

func (m *Config) Unmarshal(dAtA []byte) error

func (*Config) Write added in v1.5.0

func (c *Config) Write() error

Write writes the configuration in 'c' to this machine's Pachyderm config file.

func (*Config) XXX_DiscardUnknown added in v1.7.12

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal added in v1.7.12

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

func (*Config) XXX_Merge added in v1.7.12

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

func (*Config) XXX_Size added in v1.7.12

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal added in v1.7.12

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

type ConfigV1 added in v1.5.0

type ConfigV1 struct {
	// A host:port pointing pachd at a pachyderm cluster. Similar to the
	// PACHD_ADDRESS environment variable, though PACHD_ADDRESS overrides
	// this.
	PachdAddress string `protobuf:"bytes,2,opt,name=pachd_address,json=pachdAddress,proto3" json:"pachd_address,omitempty"`
	// Trusted root certificates (overrides installed certificates), formatted
	// as base64-encoded PEM
	ServerCAs string `protobuf:"bytes,3,opt,name=server_cas,json=serverCas,proto3" json:"server_cas,omitempty"`
	// A secret token identifying the current pachctl user within their
	// pachyderm cluster. This is included in all RPCs sent by pachctl, and used
	// to determine if pachctl actions are authorized.
	SessionToken string `protobuf:"bytes,1,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
	// The currently active transaction for batching together pachctl commands.
	// This can be set or cleared via many of the `pachctl * transaction` commands.
	// This is the ID of the transaction object stored in the pachyderm etcd.
	ActiveTransaction    string   `protobuf:"bytes,4,opt,name=active_transaction,json=activeTransaction,proto3" json:"active_transaction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ConfigV1 specifies v1 of the pachyderm config (June 30 2017 - present) DO NOT change or remove field numbers from this proto, as if you do, v1 user configs will become unparseable.

func (*ConfigV1) Descriptor added in v1.5.0

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

func (*ConfigV1) GetActiveTransaction added in v1.9.0

func (m *ConfigV1) GetActiveTransaction() string

func (*ConfigV1) GetPachdAddress added in v1.5.0

func (m *ConfigV1) GetPachdAddress() string

func (*ConfigV1) GetServerCAs added in v1.7.4

func (m *ConfigV1) GetServerCAs() string

func (*ConfigV1) GetSessionToken added in v1.5.1

func (m *ConfigV1) GetSessionToken() string

func (*ConfigV1) Marshal added in v1.5.0

func (m *ConfigV1) Marshal() (dAtA []byte, err error)

func (*ConfigV1) MarshalTo added in v1.5.0

func (m *ConfigV1) MarshalTo(dAtA []byte) (int, error)

func (*ConfigV1) ProtoMessage added in v1.5.0

func (*ConfigV1) ProtoMessage()

func (*ConfigV1) Reset added in v1.5.0

func (m *ConfigV1) Reset()

func (*ConfigV1) Size added in v1.5.0

func (m *ConfigV1) Size() (n int)

func (*ConfigV1) String added in v1.5.0

func (m *ConfigV1) String() string

func (*ConfigV1) Unmarshal added in v1.5.0

func (m *ConfigV1) Unmarshal(dAtA []byte) error

func (*ConfigV1) XXX_DiscardUnknown added in v1.7.12

func (m *ConfigV1) XXX_DiscardUnknown()

func (*ConfigV1) XXX_Marshal added in v1.7.12

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

func (*ConfigV1) XXX_Merge added in v1.7.12

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

func (*ConfigV1) XXX_Size added in v1.7.12

func (m *ConfigV1) XXX_Size() int

func (*ConfigV1) XXX_Unmarshal added in v1.7.12

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

Jump to

Keyboard shortcuts

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