proto

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Default_BearerToken_RefreshIntervalSec float32 = 60

Variables

This section is empty.

Functions

This section is empty.

Types

type BearerToken

type BearerToken struct {
	// Types that are valid to be assigned to Source:
	//	*BearerToken_File
	//	*BearerToken_Cmd
	//	*BearerToken_GceServiceAccount
	Source isBearerToken_Source `protobuf_oneof:"source"`
	// How often to refresh token. As OAuth token usually expire, we need to
	// refresh them on a regular interval. If set to 0, caching is disabled.
	RefreshIntervalSec   *float32 `protobuf:"fixed32,90,opt,name=refresh_interval_sec,json=refreshIntervalSec,def=60" json:"refresh_interval_sec,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Bearer token is added to the HTTP request through an HTTP header: "Authorization: Bearer <access_token>"

func (*BearerToken) Descriptor

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

func (*BearerToken) GetCmd

func (m *BearerToken) GetCmd() string

func (*BearerToken) GetFile

func (m *BearerToken) GetFile() string

func (*BearerToken) GetGceServiceAccount

func (m *BearerToken) GetGceServiceAccount() string

func (*BearerToken) GetRefreshIntervalSec

func (m *BearerToken) GetRefreshIntervalSec() float32

func (*BearerToken) GetSource

func (m *BearerToken) GetSource() isBearerToken_Source

func (*BearerToken) ProtoMessage

func (*BearerToken) ProtoMessage()

func (*BearerToken) Reset

func (m *BearerToken) Reset()

func (*BearerToken) String

func (m *BearerToken) String() string

func (*BearerToken) XXX_DiscardUnknown

func (m *BearerToken) XXX_DiscardUnknown()

func (*BearerToken) XXX_Marshal

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

func (*BearerToken) XXX_Merge

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

func (*BearerToken) XXX_OneofWrappers

func (*BearerToken) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*BearerToken) XXX_Size

func (m *BearerToken) XXX_Size() int

func (*BearerToken) XXX_Unmarshal

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

type BearerToken_Cmd

type BearerToken_Cmd struct {
	Cmd string `protobuf:"bytes,2,opt,name=cmd,oneof"`
}

type BearerToken_File

type BearerToken_File struct {
	File string `protobuf:"bytes,1,opt,name=file,oneof"`
}

type BearerToken_GceServiceAccount

type BearerToken_GceServiceAccount struct {
	GceServiceAccount string `protobuf:"bytes,3,opt,name=gce_service_account,json=gceServiceAccount,oneof"`
}

type Config

type Config struct {
	// Types that are valid to be assigned to Type:
	//	*Config_BearerToken
	//	*Config_GoogleCredentials
	Type                 isConfig_Type `protobuf_oneof:"type"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Config) Descriptor

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

func (*Config) GetBearerToken

func (m *Config) GetBearerToken() *BearerToken

func (*Config) GetGoogleCredentials

func (m *Config) GetGoogleCredentials() *GoogleCredentials

func (*Config) GetType

func (m *Config) GetType() isConfig_Type

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_OneofWrappers

func (*Config) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

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

type Config_BearerToken

type Config_BearerToken struct {
	BearerToken *BearerToken `protobuf:"bytes,1,opt,name=bearer_token,json=bearerToken,oneof"`
}

type Config_GoogleCredentials

type Config_GoogleCredentials struct {
	GoogleCredentials *GoogleCredentials `protobuf:"bytes,2,opt,name=google_credentials,json=googleCredentials,oneof"`
}

type GoogleCredentials

type GoogleCredentials struct {
	JsonFile *string  `protobuf:"bytes,1,opt,name=json_file,json=jsonFile" json:"json_file,omitempty"`
	Scope    []string `protobuf:"bytes,2,rep,name=scope" json:"scope,omitempty"`
	// Use encoded JWT directly as access token, instead of implementing the whole
	// OAuth2.0 flow.
	JwtAsAccessToken *bool `protobuf:"varint,4,opt,name=jwt_as_access_token,json=jwtAsAccessToken" json:"jwt_as_access_token,omitempty"`
	// Audience works only if jwt_as_access_token is true.
	Audience             *string  `protobuf:"bytes,3,opt,name=audience" json:"audience,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Google credentials in JSON format. We simply use oauth2/google package to use these credentials.

func (*GoogleCredentials) Descriptor

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

func (*GoogleCredentials) GetAudience

func (m *GoogleCredentials) GetAudience() string

func (*GoogleCredentials) GetJsonFile

func (m *GoogleCredentials) GetJsonFile() string

func (*GoogleCredentials) GetJwtAsAccessToken

func (m *GoogleCredentials) GetJwtAsAccessToken() bool

func (*GoogleCredentials) GetScope

func (m *GoogleCredentials) GetScope() []string

func (*GoogleCredentials) ProtoMessage

func (*GoogleCredentials) ProtoMessage()

func (*GoogleCredentials) Reset

func (m *GoogleCredentials) Reset()

func (*GoogleCredentials) String

func (m *GoogleCredentials) String() string

func (*GoogleCredentials) XXX_DiscardUnknown

func (m *GoogleCredentials) XXX_DiscardUnknown()

func (*GoogleCredentials) XXX_Marshal

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

func (*GoogleCredentials) XXX_Merge

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

func (*GoogleCredentials) XXX_Size

func (m *GoogleCredentials) XXX_Size() int

func (*GoogleCredentials) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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