gateway

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterAuth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gateway.ClusterAuth",
	HandlerType: (*ClusterAuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAuthToken",
			Handler:    _ClusterAuth_GetAuthToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/gateway/service.proto",
}

ClusterAuth_ServiceDesc is the grpc.ServiceDesc for ClusterAuth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_gateway_service_proto protoreflect.FileDescriptor
View Source
var Gateway_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gateway.Gateway",
	HandlerType: (*GatewayServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAuthInformation",
			Handler:    _Gateway_GetAuthInformation_Handler,
		},
		{
			MethodName: "ExchangeAuthCode",
			Handler:    _Gateway_ExchangeAuthCode_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/gateway/service.proto",
}

Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterClusterAuthServer

func RegisterClusterAuthServer(s grpc.ServiceRegistrar, srv ClusterAuthServer)

func RegisterGatewayServer

func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer)

Types

type AuthCode

type AuthCode struct {
	Code        string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	State       string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	CallbackUrl string `protobuf:"bytes,3,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthCode) Descriptor deprecated

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

Deprecated: Use AuthCode.ProtoReflect.Descriptor instead.

func (*AuthCode) GetCallbackUrl

func (x *AuthCode) GetCallbackUrl() string

func (*AuthCode) GetCode

func (x *AuthCode) GetCode() string

func (*AuthCode) GetState

func (x *AuthCode) GetState() string

func (*AuthCode) ProtoMessage

func (*AuthCode) ProtoMessage()

func (*AuthCode) ProtoReflect

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

func (*AuthCode) Reset

func (x *AuthCode) Reset()

func (*AuthCode) String

func (x *AuthCode) String() string

type AuthInformation

type AuthInformation struct {
	AuthCodeUrl string `protobuf:"bytes,1,opt,name=auth_code_url,json=authCodeUrl,proto3" json:"auth_code_url,omitempty"`
	State       string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthInformation) Descriptor deprecated

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

Deprecated: Use AuthInformation.ProtoReflect.Descriptor instead.

func (*AuthInformation) GetAuthCodeUrl

func (x *AuthInformation) GetAuthCodeUrl() string

func (*AuthInformation) GetState

func (x *AuthInformation) GetState() string

func (*AuthInformation) ProtoMessage

func (*AuthInformation) ProtoMessage()

func (*AuthInformation) ProtoReflect

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

func (*AuthInformation) Reset

func (x *AuthInformation) Reset()

func (*AuthInformation) String

func (x *AuthInformation) String() string

type AuthResponse

type AuthResponse struct {
	AccessToken string                 `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	Expiry      *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
	Username    string                 `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthResponse) Descriptor deprecated

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

Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.

func (*AuthResponse) GetAccessToken

func (x *AuthResponse) GetAccessToken() string

func (*AuthResponse) GetExpiry

func (x *AuthResponse) GetExpiry() *timestamppb.Timestamp

func (*AuthResponse) GetUsername

func (x *AuthResponse) GetUsername() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) ProtoReflect

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

func (*AuthResponse) Reset

func (x *AuthResponse) Reset()

func (*AuthResponse) String

func (x *AuthResponse) String() string

type AuthState

type AuthState struct {
	CallbackUrl string `protobuf:"bytes,1,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthState) Descriptor deprecated

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

Deprecated: Use AuthState.ProtoReflect.Descriptor instead.

func (*AuthState) GetCallbackUrl

func (x *AuthState) GetCallbackUrl() string

func (*AuthState) ProtoMessage

func (*AuthState) ProtoMessage()

func (*AuthState) ProtoReflect

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

func (*AuthState) Reset

func (x *AuthState) Reset()

func (*AuthState) String

func (x *AuthState) String() string

type ClusterAuthClient

type ClusterAuthClient interface {
	GetAuthToken(ctx context.Context, in *ClusterAuthTokenRequest, opts ...grpc.CallOption) (*ClusterAuthTokenResponse, error)
}

ClusterAuthClient is the client API for ClusterAuth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ClusterAuthServer

type ClusterAuthServer interface {
	GetAuthToken(context.Context, *ClusterAuthTokenRequest) (*ClusterAuthTokenResponse, error)
	// contains filtered or unexported methods
}

ClusterAuthServer is the server API for ClusterAuth service. All implementations must embed UnimplementedClusterAuthServer for forward compatibility

type ClusterAuthTokenRequest

type ClusterAuthTokenRequest struct {

	// Unique identifier of the cluster (UUID 128-bit number)
	ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Kubernetes role name
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

ClusterAuthTokenRequest is send in order to retrieve an auth token valid to authenticate against a certain cluster with a specific role

func (*ClusterAuthTokenRequest) Descriptor deprecated

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

Deprecated: Use ClusterAuthTokenRequest.ProtoReflect.Descriptor instead.

func (*ClusterAuthTokenRequest) GetClusterId

func (x *ClusterAuthTokenRequest) GetClusterId() string

func (*ClusterAuthTokenRequest) GetRole

func (x *ClusterAuthTokenRequest) GetRole() string

func (*ClusterAuthTokenRequest) ProtoMessage

func (*ClusterAuthTokenRequest) ProtoMessage()

func (*ClusterAuthTokenRequest) ProtoReflect

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

func (*ClusterAuthTokenRequest) Reset

func (x *ClusterAuthTokenRequest) Reset()

func (*ClusterAuthTokenRequest) String

func (x *ClusterAuthTokenRequest) String() string

type ClusterAuthTokenResponse

type ClusterAuthTokenResponse struct {
	AccessToken string                 `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	Expiry      *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

ClusterAuthTokenResponse contains an auth token valid to authenticate against a certain cluster with a specific role

func (*ClusterAuthTokenResponse) Descriptor deprecated

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

Deprecated: Use ClusterAuthTokenResponse.ProtoReflect.Descriptor instead.

func (*ClusterAuthTokenResponse) GetAccessToken

func (x *ClusterAuthTokenResponse) GetAccessToken() string

func (*ClusterAuthTokenResponse) GetExpiry

func (*ClusterAuthTokenResponse) ProtoMessage

func (*ClusterAuthTokenResponse) ProtoMessage()

func (*ClusterAuthTokenResponse) ProtoReflect

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

func (*ClusterAuthTokenResponse) Reset

func (x *ClusterAuthTokenResponse) Reset()

func (*ClusterAuthTokenResponse) String

func (x *ClusterAuthTokenResponse) String() string

type GatewayClient

type GatewayClient interface {
	GetAuthInformation(ctx context.Context, in *AuthState, opts ...grpc.CallOption) (*AuthInformation, error)
	ExchangeAuthCode(ctx context.Context, in *AuthCode, opts ...grpc.CallOption) (*AuthResponse, error)
}

GatewayClient is the client API for Gateway service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGatewayClient

func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient

type GatewayServer

type GatewayServer interface {
	GetAuthInformation(context.Context, *AuthState) (*AuthInformation, error)
	ExchangeAuthCode(context.Context, *AuthCode) (*AuthResponse, error)
	// contains filtered or unexported methods
}

GatewayServer is the server API for Gateway service. All implementations must embed UnimplementedGatewayServer for forward compatibility

type UnimplementedClusterAuthServer

type UnimplementedClusterAuthServer struct {
}

UnimplementedClusterAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedClusterAuthServer) GetAuthToken

type UnimplementedGatewayServer

type UnimplementedGatewayServer struct {
}

UnimplementedGatewayServer must be embedded to have forward compatible implementations.

func (UnimplementedGatewayServer) ExchangeAuthCode

func (UnimplementedGatewayServer) GetAuthInformation

type UnsafeClusterAuthServer

type UnsafeClusterAuthServer interface {
	// contains filtered or unexported methods
}

UnsafeClusterAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClusterAuthServer will result in compilation errors.

type UnsafeGatewayServer

type UnsafeGatewayServer interface {
	// contains filtered or unexported methods
}

UnsafeGatewayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayServer will result in compilation errors.

Jump to

Keyboard shortcuts

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