Documentation ¶
Overview ¶
Package winch_config is a generated protocol buffer package.
It is generated from these files:
winch/config/auth.proto winch/config/mapper.proto
It has these top-level messages:
AuthConfig AuthSource KubernetesAccess OIDCAccess DummyAccess TokenAccess MapperConfig Route DirectRoute RegexpRoute
Package winch_config is a generated protocol buffer package.
It is generated from these files:
winch/config/auth.proto winch/config/mapper.proto
It has these top-level messages:
AuthConfig AuthSource KubernetesAccess OIDCAccess DummyAccess TokenAccess MapperConfig Route DirectRoute RegexpRoute
Index ¶
- Variables
- type AuthConfig
- type AuthSource
- func (*AuthSource) Descriptor() ([]byte, []int)
- func (m *AuthSource) GetDummy() *DummyAccess
- func (m *AuthSource) GetKube() *KubernetesAccess
- func (m *AuthSource) GetName() string
- func (m *AuthSource) GetOidc() *OIDCAccess
- func (m *AuthSource) GetToken() *TokenAccess
- func (m *AuthSource) GetType() isAuthSource_Type
- func (*AuthSource) ProtoMessage()
- func (m *AuthSource) Reset()
- func (m *AuthSource) String() string
- func (this *AuthSource) Validate() error
- func (*AuthSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type AuthSource_Dummy
- type AuthSource_Kube
- type AuthSource_Oidc
- type AuthSource_Token
- type DirectRoute
- type DummyAccess
- type KubernetesAccess
- func (*KubernetesAccess) Descriptor() ([]byte, []int)
- func (m *KubernetesAccess) GetPath() string
- func (m *KubernetesAccess) GetUser() string
- func (*KubernetesAccess) ProtoMessage()
- func (m *KubernetesAccess) Reset()
- func (m *KubernetesAccess) String() string
- func (this *KubernetesAccess) Validate() error
- type MapperConfig
- type OIDCAccess
- func (*OIDCAccess) Descriptor() ([]byte, []int)
- func (m *OIDCAccess) GetClientId() string
- func (m *OIDCAccess) GetLoginCallbackPath() string
- func (m *OIDCAccess) GetPath() string
- func (m *OIDCAccess) GetProvider() string
- func (m *OIDCAccess) GetScopes() []string
- func (m *OIDCAccess) GetSecret() string
- func (*OIDCAccess) ProtoMessage()
- func (m *OIDCAccess) Reset()
- func (m *OIDCAccess) String() string
- func (this *OIDCAccess) Validate() error
- type Protocol
- type RegexpRoute
- type Route
- func (*Route) Descriptor() ([]byte, []int)
- func (m *Route) GetBackendAuth() string
- func (m *Route) GetDirect() *DirectRoute
- func (m *Route) GetProtocol() Protocol
- func (m *Route) GetProxyAuth() string
- func (m *Route) GetRegexp() *RegexpRoute
- func (m *Route) GetType() isRoute_Type
- func (*Route) ProtoMessage()
- func (m *Route) Reset()
- func (m *Route) String() string
- func (this *Route) Validate() error
- func (*Route) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Route_Direct
- type Route_Regexp
- type TokenAccess
Constants ¶
This section is empty.
Variables ¶
var Protocol_name = map[int32]string{
0: "ANY",
1: "HTTP",
2: "GRPC",
}
var Protocol_value = map[string]int32{
"ANY": 0,
"HTTP": 1,
"GRPC": 2,
}
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
AuthSources []*AuthSource `protobuf:"bytes,1,rep,name=auth_sources,json=authSources" json:"auth_sources,omitempty"`
}
/ AuthConfig is the top level configuration message for a winch auth.
func (*AuthConfig) Descriptor ¶
func (*AuthConfig) Descriptor() ([]byte, []int)
func (*AuthConfig) GetAuthSources ¶
func (m *AuthConfig) GetAuthSources() []*AuthSource
func (*AuthConfig) ProtoMessage ¶
func (*AuthConfig) ProtoMessage()
func (*AuthConfig) Reset ¶
func (m *AuthConfig) Reset()
func (*AuthConfig) String ¶
func (m *AuthConfig) String() string
func (*AuthConfig) Validate ¶
func (this *AuthConfig) Validate() error
type AuthSource ¶
type AuthSource struct { // name is an ID of auth source. It can be referenced inside winch routing. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Types that are valid to be assigned to Type: // *AuthSource_Dummy // *AuthSource_Kube // *AuthSource_Oidc // *AuthSource_Token Type isAuthSource_Type `protobuf_oneof:"type"` }
/ AuthSource specifies the kind of the backend auth we need to inject on winch reqeuest.
func (*AuthSource) Descriptor ¶
func (*AuthSource) Descriptor() ([]byte, []int)
func (*AuthSource) GetDummy ¶
func (m *AuthSource) GetDummy() *DummyAccess
func (*AuthSource) GetKube ¶
func (m *AuthSource) GetKube() *KubernetesAccess
func (*AuthSource) GetName ¶
func (m *AuthSource) GetName() string
func (*AuthSource) GetOidc ¶
func (m *AuthSource) GetOidc() *OIDCAccess
func (*AuthSource) GetToken ¶
func (m *AuthSource) GetToken() *TokenAccess
func (*AuthSource) GetType ¶
func (m *AuthSource) GetType() isAuthSource_Type
func (*AuthSource) ProtoMessage ¶
func (*AuthSource) ProtoMessage()
func (*AuthSource) Reset ¶
func (m *AuthSource) Reset()
func (*AuthSource) String ¶
func (m *AuthSource) String() string
func (*AuthSource) Validate ¶
func (this *AuthSource) Validate() error
func (*AuthSource) XXX_OneofFuncs ¶
func (*AuthSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type AuthSource_Dummy ¶
type AuthSource_Dummy struct {
Dummy *DummyAccess `protobuf:"bytes,2,opt,name=dummy,oneof"`
}
type AuthSource_Kube ¶
type AuthSource_Kube struct {
Kube *KubernetesAccess `protobuf:"bytes,3,opt,name=kube,oneof"`
}
type AuthSource_Oidc ¶
type AuthSource_Oidc struct {
Oidc *OIDCAccess `protobuf:"bytes,4,opt,name=oidc,oneof"`
}
type AuthSource_Token ¶
type AuthSource_Token struct {
Token *TokenAccess `protobuf:"bytes,5,opt,name=token,oneof"`
}
type DirectRoute ¶
type DirectRoute struct { // Key needs to be in host:port format. Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` }
/ Simplest routing mechanism using just direct mapping between dns and (proxy) kedge target.
func (*DirectRoute) Descriptor ¶
func (*DirectRoute) Descriptor() ([]byte, []int)
func (*DirectRoute) GetKey ¶
func (m *DirectRoute) GetKey() string
func (*DirectRoute) GetUrl ¶
func (m *DirectRoute) GetUrl() string
func (*DirectRoute) ProtoMessage ¶
func (*DirectRoute) ProtoMessage()
func (*DirectRoute) Reset ¶
func (m *DirectRoute) Reset()
func (*DirectRoute) String ¶
func (m *DirectRoute) String() string
func (*DirectRoute) Validate ¶
func (this *DirectRoute) Validate() error
type DummyAccess ¶
type DummyAccess struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
DummyAccess just directly passes specified value into auth header. If value is not specified it will return error.
func (*DummyAccess) Descriptor ¶
func (*DummyAccess) Descriptor() ([]byte, []int)
func (*DummyAccess) GetValue ¶
func (m *DummyAccess) GetValue() string
func (*DummyAccess) ProtoMessage ¶
func (*DummyAccess) ProtoMessage()
func (*DummyAccess) Reset ¶
func (m *DummyAccess) Reset()
func (*DummyAccess) String ¶
func (m *DummyAccess) String() string
func (*DummyAccess) Validate ¶
func (this *DummyAccess) Validate() error
type KubernetesAccess ¶
type KubernetesAccess struct { // User to reference access credentials from. User string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` // By default ~/.kube/config as usual. Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` }
/ KubernetesAccess is an convenient way of specifying auth for backend. It grabs the data inside already used / ~/.kube/config (or any specified config path) and deducts the auth type based on that. NOTE that only these types are / supported: / - OIDC
func (*KubernetesAccess) Descriptor ¶
func (*KubernetesAccess) Descriptor() ([]byte, []int)
func (*KubernetesAccess) GetPath ¶
func (m *KubernetesAccess) GetPath() string
func (*KubernetesAccess) GetUser ¶
func (m *KubernetesAccess) GetUser() string
func (*KubernetesAccess) ProtoMessage ¶
func (*KubernetesAccess) ProtoMessage()
func (*KubernetesAccess) Reset ¶
func (m *KubernetesAccess) Reset()
func (*KubernetesAccess) String ¶
func (m *KubernetesAccess) String() string
func (*KubernetesAccess) Validate ¶
func (this *KubernetesAccess) Validate() error
type MapperConfig ¶
type MapperConfig struct {
Routes []*Route `protobuf:"bytes,1,rep,name=routes" json:"routes,omitempty"`
}
/ MapperConfig is the top level configuration message for a winch mapper.
func (*MapperConfig) Descriptor ¶
func (*MapperConfig) Descriptor() ([]byte, []int)
func (*MapperConfig) GetRoutes ¶
func (m *MapperConfig) GetRoutes() []*Route
func (*MapperConfig) ProtoMessage ¶
func (*MapperConfig) ProtoMessage()
func (*MapperConfig) Reset ¶
func (m *MapperConfig) Reset()
func (*MapperConfig) String ¶
func (m *MapperConfig) String() string
func (*MapperConfig) Validate ¶
func (this *MapperConfig) Validate() error
type OIDCAccess ¶
type OIDCAccess struct { Provider string `protobuf:"bytes,1,opt,name=provider" json:"provider,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId" json:"client_id,omitempty"` Secret string `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"` Scopes []string `protobuf:"bytes,4,rep,name=scopes" json:"scopes,omitempty"` Path string `protobuf:"bytes,5,opt,name=path" json:"path,omitempty"` // login_callback_path specified URL path for redirect URL to specify when doing OIDC login. // If empty login will be disabled which means in case of no refresh token or not valid one, error will be returned // thus not needing user interaction. LoginCallbackPath string `protobuf:"bytes,6,opt,name=login_callback_path,json=loginCallbackPath" json:"login_callback_path,omitempty"` }
func (*OIDCAccess) Descriptor ¶
func (*OIDCAccess) Descriptor() ([]byte, []int)
func (*OIDCAccess) GetClientId ¶
func (m *OIDCAccess) GetClientId() string
func (*OIDCAccess) GetLoginCallbackPath ¶
func (m *OIDCAccess) GetLoginCallbackPath() string
func (*OIDCAccess) GetPath ¶
func (m *OIDCAccess) GetPath() string
func (*OIDCAccess) GetProvider ¶
func (m *OIDCAccess) GetProvider() string
func (*OIDCAccess) GetScopes ¶
func (m *OIDCAccess) GetScopes() []string
func (*OIDCAccess) GetSecret ¶
func (m *OIDCAccess) GetSecret() string
func (*OIDCAccess) ProtoMessage ¶
func (*OIDCAccess) ProtoMessage()
func (*OIDCAccess) Reset ¶
func (m *OIDCAccess) Reset()
func (*OIDCAccess) String ¶
func (m *OIDCAccess) String() string
func (*OIDCAccess) Validate ¶
func (this *OIDCAccess) Validate() error
type RegexpRoute ¶
type RegexpRoute struct { // Regexp RE2 expression that will be applied on given domain:port Exp string `protobuf:"bytes,1,opt,name=exp" json:"exp,omitempty"` // Kedge URL to be used if we have a match. It can be a string including variable from regexp expression in a form // of bash-like variable. E.g // exp = ([a-z0-9-].*)[.](?P<cluster>[a-z0-9-].*)[.]internal[.]example[.]org // in that case you can use following variable: // - ${cluster} Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` }
func (*RegexpRoute) Descriptor ¶
func (*RegexpRoute) Descriptor() ([]byte, []int)
func (*RegexpRoute) GetExp ¶
func (m *RegexpRoute) GetExp() string
func (*RegexpRoute) GetUrl ¶
func (m *RegexpRoute) GetUrl() string
func (*RegexpRoute) ProtoMessage ¶
func (*RegexpRoute) ProtoMessage()
func (*RegexpRoute) Reset ¶
func (m *RegexpRoute) Reset()
func (*RegexpRoute) String ¶
func (m *RegexpRoute) String() string
func (*RegexpRoute) Validate ¶
func (this *RegexpRoute) Validate() error
type Route ¶
type Route struct { // Optional auth injection. Reference to AuthSource. BackendAuth string `protobuf:"bytes,1,opt,name=backend_auth,json=backendAuth" json:"backend_auth,omitempty"` ProxyAuth string `protobuf:"bytes,2,opt,name=proxy_auth,json=proxyAuth" json:"proxy_auth,omitempty"` // Types that are valid to be assigned to Type: // *Route_Direct // *Route_Regexp Type isRoute_Type `protobuf_oneof:"type"` Protocol Protocol `protobuf:"varint,5,opt,name=protocol,enum=winch.config.Protocol" json:"protocol,omitempty"` }
func (*Route) Descriptor ¶
func (*Route) GetBackendAuth ¶
func (*Route) GetDirect ¶
func (m *Route) GetDirect() *DirectRoute
func (*Route) GetProtocol ¶
func (*Route) GetProxyAuth ¶
func (*Route) GetRegexp ¶
func (m *Route) GetRegexp() *RegexpRoute
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
type Route_Direct ¶
type Route_Direct struct {
Direct *DirectRoute `protobuf:"bytes,3,opt,name=direct,oneof"`
}
type Route_Regexp ¶
type Route_Regexp struct {
Regexp *RegexpRoute `protobuf:"bytes,4,opt,name=regexp,oneof"`
}
type TokenAccess ¶
type TokenAccess struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}
TokenAccess passes specified token into auth header as a bearer.
func (*TokenAccess) Descriptor ¶
func (*TokenAccess) Descriptor() ([]byte, []int)
func (*TokenAccess) GetToken ¶
func (m *TokenAccess) GetToken() string
func (*TokenAccess) ProtoMessage ¶
func (*TokenAccess) ProtoMessage()
func (*TokenAccess) Reset ¶
func (m *TokenAccess) Reset()
func (*TokenAccess) String ¶
func (m *TokenAccess) String() string
func (*TokenAccess) Validate ¶
func (this *TokenAccess) Validate() error