config

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CloneStrategy_name = map[int32]string{
		0: "SSH",
		1: "HTTP",
	}
	CloneStrategy_value = map[string]int32{
		"SSH":  0,
		"HTTP": 1,
	}
)

Enum value maps for CloneStrategy.

View Source
var File_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Account

type Account struct {
	Github    *Github    `protobuf:"bytes,1,opt,name=github,proto3" json:"github,omitempty"`
	Gitlab    *Gitlab    `protobuf:"bytes,2,opt,name=gitlab,proto3" json:"gitlab,omitempty"`
	Bitbucket *Bitbucket `protobuf:"bytes,3,opt,name=bitbucket,proto3" json:"bitbucket,omitempty"`
	Generic   *Generic   `protobuf:"bytes,4,opt,name=generic,proto3" json:"generic,omitempty"`
	Static    *Static    `protobuf:"bytes,5,opt,name=static,proto3" json:"static,omitempty"`
	Rds       *Rds       `protobuf:"bytes,6,opt,name=rds,proto3" json:"rds,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetBitbucket

func (x *Account) GetBitbucket() *Bitbucket

func (*Account) GetGeneric

func (x *Account) GetGeneric() *Generic

func (*Account) GetGithub

func (x *Account) GetGithub() *Github

func (*Account) GetGitlab

func (x *Account) GetGitlab() *Gitlab

func (*Account) GetRds

func (x *Account) GetRds() *Rds

func (*Account) GetStatic

func (x *Account) GetStatic() *Static

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type Basic

type Basic struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*Basic) Descriptor deprecated

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

Deprecated: Use Basic.ProtoReflect.Descriptor instead.

func (*Basic) GetPassword

func (x *Basic) GetPassword() string

func (*Basic) GetUsername

func (x *Basic) GetUsername() string

func (*Basic) ProtoMessage

func (*Basic) ProtoMessage()

func (*Basic) ProtoReflect

func (x *Basic) ProtoReflect() protoreflect.Message

func (*Basic) Reset

func (x *Basic) Reset()

func (*Basic) String

func (x *Basic) String() string

type Bitbucket

type Bitbucket struct {
	Users []string `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
	Teams []string `protobuf:"bytes,4,rep,name=teams,proto3" json:"teams,omitempty"`
	// Deprecated: Do not use.
	Strategy  CloneStrategy `protobuf:"varint,5,opt,name=strategy,proto3,enum=cloud.deps.indexer.config.CloneStrategy" json:"strategy,omitempty"`
	Clone     *Clone        `protobuf:"bytes,6,opt,name=clone,proto3" json:"clone,omitempty"`
	SkipTeams []string      `protobuf:"bytes,7,rep,name=skip_teams,json=skipTeams,proto3" json:"skip_teams,omitempty"`
	Basic     *Basic        `protobuf:"bytes,10,opt,name=basic,proto3" json:"basic,omitempty"`
	Oauth     *OAuthToken   `protobuf:"bytes,11,opt,name=oauth,proto3" json:"oauth,omitempty"`
	// contains filtered or unexported fields
}

func (*Bitbucket) Descriptor deprecated

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

Deprecated: Use Bitbucket.ProtoReflect.Descriptor instead.

func (*Bitbucket) GetBasic

func (x *Bitbucket) GetBasic() *Basic

func (*Bitbucket) GetClone

func (x *Bitbucket) GetClone() *Clone

func (*Bitbucket) GetOauth

func (x *Bitbucket) GetOauth() *OAuthToken

func (*Bitbucket) GetSkipTeams

func (x *Bitbucket) GetSkipTeams() []string

func (*Bitbucket) GetStrategy deprecated

func (x *Bitbucket) GetStrategy() CloneStrategy

Deprecated: Do not use.

func (*Bitbucket) GetTeams

func (x *Bitbucket) GetTeams() []string

func (*Bitbucket) GetUsers

func (x *Bitbucket) GetUsers() []string

func (*Bitbucket) ProtoMessage

func (*Bitbucket) ProtoMessage()

func (*Bitbucket) ProtoReflect

func (x *Bitbucket) ProtoReflect() protoreflect.Message

func (*Bitbucket) Reset

func (x *Bitbucket) Reset()

func (*Bitbucket) String

func (x *Bitbucket) String() string

type Clone

type Clone struct {
	Strategy  CloneStrategy `protobuf:"varint,1,opt,name=strategy,proto3,enum=cloud.deps.indexer.config.CloneStrategy" json:"strategy,omitempty"`
	Basic     *Basic        `protobuf:"bytes,2,opt,name=basic,proto3" json:"basic,omitempty"`
	PublicKey *PublicKey    `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*Clone) Descriptor deprecated

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

Deprecated: Use Clone.ProtoReflect.Descriptor instead.

func (*Clone) GetBasic

func (x *Clone) GetBasic() *Basic

func (*Clone) GetPublicKey

func (x *Clone) GetPublicKey() *PublicKey

func (*Clone) GetStrategy

func (x *Clone) GetStrategy() CloneStrategy

func (*Clone) ProtoMessage

func (*Clone) ProtoMessage()

func (*Clone) ProtoReflect

func (x *Clone) ProtoReflect() protoreflect.Message

func (*Clone) Reset

func (x *Clone) Reset()

func (*Clone) String

func (x *Clone) String() string

type CloneStrategy

type CloneStrategy int32
const (
	CloneStrategy_SSH  CloneStrategy = 0
	CloneStrategy_HTTP CloneStrategy = 1
)

func (CloneStrategy) Descriptor

func (CloneStrategy) Enum

func (x CloneStrategy) Enum() *CloneStrategy

func (CloneStrategy) EnumDescriptor deprecated

func (CloneStrategy) EnumDescriptor() ([]byte, []int)

Deprecated: Use CloneStrategy.Descriptor instead.

func (CloneStrategy) Number

func (CloneStrategy) String

func (x CloneStrategy) String() string

func (CloneStrategy) Type

type Configuration

type Configuration struct {
	Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetAccounts

func (x *Configuration) GetAccounts() []*Account

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

func (x *Configuration) ProtoReflect() protoreflect.Message

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type Generic

type Generic struct {
	BaseUrl          string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
	Path             string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	PerPageParameter string `protobuf:"bytes,3,opt,name=per_page_parameter,json=perPageParameter,proto3" json:"per_page_parameter,omitempty"`
	PageParameter    string `protobuf:"bytes,4,opt,name=page_parameter,json=pageParameter,proto3" json:"page_parameter,omitempty"`
	PageSize         int32  `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	Selector         string `protobuf:"bytes,6,opt,name=selector,proto3" json:"selector,omitempty"`
	Clone            *Clone `protobuf:"bytes,7,opt,name=clone,proto3" json:"clone,omitempty"`
	Basic            *Basic `protobuf:"bytes,10,opt,name=basic,proto3" json:"basic,omitempty"`
	// contains filtered or unexported fields
}

func (*Generic) Descriptor deprecated

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

Deprecated: Use Generic.ProtoReflect.Descriptor instead.

func (*Generic) GetBaseUrl

func (x *Generic) GetBaseUrl() string

func (*Generic) GetBasic

func (x *Generic) GetBasic() *Basic

func (*Generic) GetClone

func (x *Generic) GetClone() *Clone

func (*Generic) GetPageParameter

func (x *Generic) GetPageParameter() string

func (*Generic) GetPageSize

func (x *Generic) GetPageSize() int32

func (*Generic) GetPath

func (x *Generic) GetPath() string

func (*Generic) GetPerPageParameter

func (x *Generic) GetPerPageParameter() string

func (*Generic) GetSelector

func (x *Generic) GetSelector() string

func (*Generic) ProtoMessage

func (*Generic) ProtoMessage()

func (*Generic) ProtoReflect

func (x *Generic) ProtoReflect() protoreflect.Message

func (*Generic) Reset

func (x *Generic) Reset()

func (*Generic) String

func (x *Generic) String() string

type Github

type Github struct {
	BaseUrl       string   `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
	UploadUrl     string   `protobuf:"bytes,2,opt,name=upload_url,json=uploadUrl,proto3" json:"upload_url,omitempty"`
	Users         []string `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
	Organizations []string `protobuf:"bytes,4,rep,name=organizations,proto3" json:"organizations,omitempty"`
	// Deprecated: Do not use.
	Strategy          CloneStrategy `protobuf:"varint,5,opt,name=strategy,proto3,enum=cloud.deps.indexer.config.CloneStrategy" json:"strategy,omitempty"`
	Clone             *Clone        `protobuf:"bytes,6,opt,name=clone,proto3" json:"clone,omitempty"`
	SkipOrganizations []string      `protobuf:"bytes,7,rep,name=skip_organizations,json=skipOrganizations,proto3" json:"skip_organizations,omitempty"`
	Oauth2            *OAuth2Token  `protobuf:"bytes,10,opt,name=oauth2,proto3" json:"oauth2,omitempty"`
	// contains filtered or unexported fields
}

func (*Github) Descriptor deprecated

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

Deprecated: Use Github.ProtoReflect.Descriptor instead.

func (*Github) GetBaseUrl

func (x *Github) GetBaseUrl() string

func (*Github) GetClone

func (x *Github) GetClone() *Clone

func (*Github) GetOauth2

func (x *Github) GetOauth2() *OAuth2Token

func (*Github) GetOrganizations

func (x *Github) GetOrganizations() []string

func (*Github) GetSkipOrganizations

func (x *Github) GetSkipOrganizations() []string

func (*Github) GetStrategy deprecated

func (x *Github) GetStrategy() CloneStrategy

Deprecated: Do not use.

func (*Github) GetUploadUrl

func (x *Github) GetUploadUrl() string

func (*Github) GetUsers

func (x *Github) GetUsers() []string

func (*Github) ProtoMessage

func (*Github) ProtoMessage()

func (*Github) ProtoReflect

func (x *Github) ProtoReflect() protoreflect.Message

func (*Github) Reset

func (x *Github) Reset()

func (*Github) String

func (x *Github) String() string

type Gitlab

type Gitlab struct {
	BaseUrl string   `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
	Users   []string `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
	Groups  []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
	// Deprecated: Do not use.
	Strategy   CloneStrategy `protobuf:"varint,5,opt,name=strategy,proto3,enum=cloud.deps.indexer.config.CloneStrategy" json:"strategy,omitempty"`
	Clone      *Clone        `protobuf:"bytes,6,opt,name=clone,proto3" json:"clone,omitempty"`
	SkipGroups []string      `protobuf:"bytes,7,rep,name=skip_groups,json=skipGroups,proto3" json:"skip_groups,omitempty"`
	Private    *OAuthToken   `protobuf:"bytes,10,opt,name=private,proto3" json:"private,omitempty"`
	Oauth      *OAuthToken   `protobuf:"bytes,11,opt,name=oauth,proto3" json:"oauth,omitempty"`
	// contains filtered or unexported fields
}

func (*Gitlab) Descriptor deprecated

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

Deprecated: Use Gitlab.ProtoReflect.Descriptor instead.

func (*Gitlab) GetBaseUrl

func (x *Gitlab) GetBaseUrl() string

func (*Gitlab) GetClone

func (x *Gitlab) GetClone() *Clone

func (*Gitlab) GetGroups

func (x *Gitlab) GetGroups() []string

func (*Gitlab) GetOauth

func (x *Gitlab) GetOauth() *OAuthToken

func (*Gitlab) GetPrivate

func (x *Gitlab) GetPrivate() *OAuthToken

func (*Gitlab) GetSkipGroups

func (x *Gitlab) GetSkipGroups() []string

func (*Gitlab) GetStrategy deprecated

func (x *Gitlab) GetStrategy() CloneStrategy

Deprecated: Do not use.

func (*Gitlab) GetUsers

func (x *Gitlab) GetUsers() []string

func (*Gitlab) ProtoMessage

func (*Gitlab) ProtoMessage()

func (*Gitlab) ProtoReflect

func (x *Gitlab) ProtoReflect() protoreflect.Message

func (*Gitlab) Reset

func (x *Gitlab) Reset()

func (*Gitlab) String

func (x *Gitlab) String() string

type OAuth2Token

type OAuth2Token struct {
	Token        string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	TokenType    string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"`
	RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	Expiry       string `protobuf:"bytes,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

func (*OAuth2Token) Descriptor deprecated

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

Deprecated: Use OAuth2Token.ProtoReflect.Descriptor instead.

func (*OAuth2Token) GetExpiry

func (x *OAuth2Token) GetExpiry() string

func (*OAuth2Token) GetRefreshToken

func (x *OAuth2Token) GetRefreshToken() string

func (*OAuth2Token) GetToken

func (x *OAuth2Token) GetToken() string

func (*OAuth2Token) GetTokenType

func (x *OAuth2Token) GetTokenType() string

func (*OAuth2Token) ProtoMessage

func (*OAuth2Token) ProtoMessage()

func (*OAuth2Token) ProtoReflect

func (x *OAuth2Token) ProtoReflect() protoreflect.Message

func (*OAuth2Token) Reset

func (x *OAuth2Token) Reset()

func (*OAuth2Token) String

func (x *OAuth2Token) String() string

type OAuthToken

type OAuthToken struct {
	Token         string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	ApplicationId string `protobuf:"bytes,2,opt,name=application_id,json=applicationId,proto3" json:"application_id,omitempty"`
	// contains filtered or unexported fields
}

func (*OAuthToken) Descriptor deprecated

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

Deprecated: Use OAuthToken.ProtoReflect.Descriptor instead.

func (*OAuthToken) GetApplicationId

func (x *OAuthToken) GetApplicationId() string

func (*OAuthToken) GetToken

func (x *OAuthToken) GetToken() string

func (*OAuthToken) ProtoMessage

func (*OAuthToken) ProtoMessage()

func (*OAuthToken) ProtoReflect

func (x *OAuthToken) ProtoReflect() protoreflect.Message

func (*OAuthToken) Reset

func (x *OAuthToken) Reset()

func (*OAuthToken) String

func (x *OAuthToken) String() string

type Parser

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

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

type PublicKey

type PublicKey struct {
	User           string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	PrivateKeyPath string `protobuf:"bytes,2,opt,name=private_key_path,json=privateKeyPath,proto3" json:"private_key_path,omitempty"`
	PrivateKey     string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	Password       string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicKey) Descriptor deprecated

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

Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.

func (*PublicKey) GetPassword

func (x *PublicKey) GetPassword() string

func (*PublicKey) GetPrivateKey

func (x *PublicKey) GetPrivateKey() string

func (*PublicKey) GetPrivateKeyPath

func (x *PublicKey) GetPrivateKeyPath() string

func (*PublicKey) GetUser

func (x *PublicKey) GetUser() string

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) ProtoReflect

func (x *PublicKey) ProtoReflect() protoreflect.Message

func (*PublicKey) Reset

func (x *PublicKey) Reset()

func (*PublicKey) String

func (x *PublicKey) String() string

type Rds

type Rds struct {
	Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	// contains filtered or unexported fields
}

func (*Rds) Descriptor deprecated

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

Deprecated: Use Rds.ProtoReflect.Descriptor instead.

func (*Rds) GetTarget

func (x *Rds) GetTarget() string

func (*Rds) ProtoMessage

func (*Rds) ProtoMessage()

func (*Rds) ProtoReflect

func (x *Rds) ProtoReflect() protoreflect.Message

func (*Rds) Reset

func (x *Rds) Reset()

func (*Rds) String

func (x *Rds) String() string

type Static

type Static struct {
	RepositoryUrls []string `protobuf:"bytes,1,rep,name=repository_urls,json=repositoryUrls,proto3" json:"repository_urls,omitempty"`
	Clone          *Clone   `protobuf:"bytes,2,opt,name=clone,proto3" json:"clone,omitempty"`
	// contains filtered or unexported fields
}

func (*Static) Descriptor deprecated

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

Deprecated: Use Static.ProtoReflect.Descriptor instead.

func (*Static) GetClone

func (x *Static) GetClone() *Clone

func (*Static) GetRepositoryUrls

func (x *Static) GetRepositoryUrls() []string

func (*Static) ProtoMessage

func (*Static) ProtoMessage()

func (*Static) ProtoReflect

func (x *Static) ProtoReflect() protoreflect.Message

func (*Static) Reset

func (x *Static) Reset()

func (*Static) String

func (x *Static) String() string

Jump to

Keyboard shortcuts

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