config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloneConfiguration

type CloneConfiguration struct {
	RepositoryRoot       *wrappers.StringValue     `protobuf:"bytes,1,opt,name=repository_root,json=repositoryRoot,proto3" json:"repository_root,omitempty"`
	Depth                *wrappers.Int32Value      `protobuf:"bytes,2,opt,name=depth,proto3" json:"depth,omitempty"`
	Overrides            map[string]*CloneOverride `` /* 160-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*CloneConfiguration) Descriptor

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

func (*CloneConfiguration) GetDepth

func (m *CloneConfiguration) GetDepth() *wrappers.Int32Value

func (*CloneConfiguration) GetOverrides

func (m *CloneConfiguration) GetOverrides() map[string]*CloneOverride

func (*CloneConfiguration) GetRepositoryRoot

func (m *CloneConfiguration) GetRepositoryRoot() *wrappers.StringValue

func (*CloneConfiguration) ProtoMessage

func (*CloneConfiguration) ProtoMessage()

func (*CloneConfiguration) Reset

func (m *CloneConfiguration) Reset()

func (*CloneConfiguration) String

func (m *CloneConfiguration) String() string

func (*CloneConfiguration) XXX_DiscardUnknown

func (m *CloneConfiguration) XXX_DiscardUnknown()

func (*CloneConfiguration) XXX_Marshal

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

func (*CloneConfiguration) XXX_Merge

func (dst *CloneConfiguration) XXX_Merge(src proto.Message)

func (*CloneConfiguration) XXX_Size

func (m *CloneConfiguration) XXX_Size() int

func (*CloneConfiguration) XXX_Unmarshal

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

type CloneOverride

type CloneOverride struct {
	RepositoryRoot       *wrappers.StringValue `protobuf:"bytes,1,opt,name=repository_root,json=repositoryRoot,proto3" json:"repository_root,omitempty"`
	Depth                *wrappers.Int32Value  `protobuf:"bytes,2,opt,name=depth,proto3" json:"depth,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*CloneOverride) Descriptor

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

func (*CloneOverride) GetDepth

func (m *CloneOverride) GetDepth() *wrappers.Int32Value

func (*CloneOverride) GetRepositoryRoot

func (m *CloneOverride) GetRepositoryRoot() *wrappers.StringValue

func (*CloneOverride) ProtoMessage

func (*CloneOverride) ProtoMessage()

func (*CloneOverride) Reset

func (m *CloneOverride) Reset()

func (*CloneOverride) String

func (m *CloneOverride) String() string

func (*CloneOverride) XXX_DiscardUnknown

func (m *CloneOverride) XXX_DiscardUnknown()

func (*CloneOverride) XXX_Marshal

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

func (*CloneOverride) XXX_Merge

func (dst *CloneOverride) XXX_Merge(src proto.Message)

func (*CloneOverride) XXX_Size

func (m *CloneOverride) XXX_Size() int

func (*CloneOverride) XXX_Unmarshal

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

type Configuration

type Configuration struct {
	Mount                string              `protobuf:"bytes,1,opt,name=mount,proto3" json:"mount,omitempty"`
	Accounts             []*config.Account   `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty"`
	Clone                *CloneConfiguration `protobuf:"bytes,3,opt,name=clone,proto3" json:"clone,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func Load

func Load(url string) (*Configuration, error)

Load accepts a url that points to a configuration file. The file is then loaded into memory and parsed into a Configuration object. Parser lookup is performed based on the url's extension.

func (*Configuration) Descriptor

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

func (*Configuration) GetAccounts

func (m *Configuration) GetAccounts() []*config.Account

func (*Configuration) GetClone

func (m *Configuration) GetClone() *CloneConfiguration

func (*Configuration) GetMount

func (m *Configuration) GetMount() string

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) Reset

func (m *Configuration) Reset()

func (*Configuration) String

func (m *Configuration) String() string

func (*Configuration) XXX_DiscardUnknown

func (m *Configuration) XXX_DiscardUnknown()

func (*Configuration) XXX_Marshal

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

func (*Configuration) XXX_Merge

func (dst *Configuration) XXX_Merge(src proto.Message)

func (*Configuration) XXX_Size

func (m *Configuration) XXX_Size() int

func (*Configuration) XXX_Unmarshal

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

type Parser

type Parser = func([]byte) (*Configuration, error)

Parser defines the generic function definition used to parse binary data into the proper configuration structure.

Jump to

Keyboard shortcuts

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