proto

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_BearerToken_RefreshIntervalSec = float32(60)
)

Default values for BearerToken fields.

Variables

View Source
var File_github_com_google_cloudprober_common_oauth_proto_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BearerToken

type BearerToken struct {

	// Types that are assignable 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"`
	// contains filtered or unexported fields
}

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

func (*BearerToken) Descriptor deprecated

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

Deprecated: Use BearerToken.ProtoReflect.Descriptor instead.

func (*BearerToken) GetCmd

func (x *BearerToken) GetCmd() string

func (*BearerToken) GetFile

func (x *BearerToken) GetFile() string

func (*BearerToken) GetGceServiceAccount

func (x *BearerToken) GetGceServiceAccount() string

func (*BearerToken) GetRefreshIntervalSec

func (x *BearerToken) GetRefreshIntervalSec() float32

func (*BearerToken) GetSource

func (m *BearerToken) GetSource() isBearerToken_Source

func (*BearerToken) ProtoMessage

func (*BearerToken) ProtoMessage()

func (*BearerToken) ProtoReflect added in v0.10.8

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

func (*BearerToken) Reset

func (x *BearerToken) Reset()

func (*BearerToken) String

func (x *BearerToken) String() string

type BearerToken_Cmd

type BearerToken_Cmd struct {
	// Run a comand to obtain the token, e.g.
	// cat /var/lib/myapp/token, or
	// /var/lib/run/get_token.sh
	Cmd string `protobuf:"bytes,2,opt,name=cmd,oneof"`
}

type BearerToken_File

type BearerToken_File struct {
	// Path to token file.
	File string `protobuf:"bytes,1,opt,name=file,oneof"`
}

type BearerToken_GceServiceAccount

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

type Config

type Config struct {

	// Types that are assignable to Type:
	//	*Config_BearerToken
	//	*Config_GoogleCredentials
	Type isConfig_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetBearerToken

func (x *Config) GetBearerToken() *BearerToken

func (*Config) GetGoogleCredentials

func (x *Config) GetGoogleCredentials() *GoogleCredentials

func (*Config) GetType

func (m *Config) GetType() isConfig_Type

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect added in v0.10.8

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*GoogleCredentials) Descriptor deprecated

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

Deprecated: Use GoogleCredentials.ProtoReflect.Descriptor instead.

func (*GoogleCredentials) GetAudience

func (x *GoogleCredentials) GetAudience() string

func (*GoogleCredentials) GetJsonFile

func (x *GoogleCredentials) GetJsonFile() string

func (*GoogleCredentials) GetJwtAsAccessToken

func (x *GoogleCredentials) GetJwtAsAccessToken() bool

func (*GoogleCredentials) GetScope

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

func (*GoogleCredentials) ProtoMessage

func (*GoogleCredentials) ProtoMessage()

func (*GoogleCredentials) ProtoReflect added in v0.10.8

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

func (*GoogleCredentials) Reset

func (x *GoogleCredentials) Reset()

func (*GoogleCredentials) String

func (x *GoogleCredentials) String() string

Jump to

Keyboard shortcuts

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