auth

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: GPL-3.0, MIT Imports: 18 Imported by: 3

Documentation

Overview

Package auth is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Method_name = map[int32]string{
		0: "METHOD_NONE",
		1: "METHOD_TOKEN",
	}
	Method_value = map[string]int32{
		"METHOD_NONE":  0,
		"METHOD_TOKEN": 1,
	}
)

Enum value maps for Method.

View Source
var AuthenticationMethodTokenService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "flipt.auth.AuthenticationMethodTokenService",
	HandlerType: (*AuthenticationMethodTokenServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateToken",
			Handler:    _AuthenticationMethodTokenService_CreateToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth/auth.proto",
}

AuthenticationMethodTokenService_ServiceDesc is the grpc.ServiceDesc for AuthenticationMethodTokenService 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 AuthenticationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "flipt.auth.AuthenticationService",
	HandlerType: (*AuthenticationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAuthenticationSelf",
			Handler:    _AuthenticationService_GetAuthenticationSelf_Handler,
		},
		{
			MethodName: "GetAuthentication",
			Handler:    _AuthenticationService_GetAuthentication_Handler,
		},
		{
			MethodName: "ListAuthentications",
			Handler:    _AuthenticationService_ListAuthentications_Handler,
		},
		{
			MethodName: "DeleteAuthentication",
			Handler:    _AuthenticationService_DeleteAuthentication_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth/auth.proto",
}

AuthenticationService_ServiceDesc is the grpc.ServiceDesc for AuthenticationService 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_auth_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthenticationMethodTokenServiceHandler

func RegisterAuthenticationMethodTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthenticationMethodTokenServiceHandler registers the http handlers for service AuthenticationMethodTokenService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthenticationMethodTokenServiceHandlerClient

func RegisterAuthenticationMethodTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthenticationMethodTokenServiceClient) error

RegisterAuthenticationMethodTokenServiceHandlerClient registers the http handlers for service AuthenticationMethodTokenService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthenticationMethodTokenServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthenticationMethodTokenServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthenticationMethodTokenServiceClient" to call the correct interceptors.

func RegisterAuthenticationMethodTokenServiceHandlerFromEndpoint

func RegisterAuthenticationMethodTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthenticationMethodTokenServiceHandlerFromEndpoint is same as RegisterAuthenticationMethodTokenServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthenticationMethodTokenServiceHandlerServer

func RegisterAuthenticationMethodTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthenticationMethodTokenServiceServer) error

RegisterAuthenticationMethodTokenServiceHandlerServer registers the http handlers for service AuthenticationMethodTokenService to "mux". UnaryRPC :call AuthenticationMethodTokenServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthenticationMethodTokenServiceHandlerFromEndpoint instead.

func RegisterAuthenticationMethodTokenServiceServer

func RegisterAuthenticationMethodTokenServiceServer(s grpc.ServiceRegistrar, srv AuthenticationMethodTokenServiceServer)

func RegisterAuthenticationServiceHandler

func RegisterAuthenticationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthenticationServiceHandler registers the http handlers for service AuthenticationService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthenticationServiceHandlerClient

func RegisterAuthenticationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthenticationServiceClient) error

RegisterAuthenticationServiceHandlerClient registers the http handlers for service AuthenticationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthenticationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthenticationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthenticationServiceClient" to call the correct interceptors.

func RegisterAuthenticationServiceHandlerFromEndpoint

func RegisterAuthenticationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthenticationServiceHandlerFromEndpoint is same as RegisterAuthenticationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthenticationServiceHandlerServer

func RegisterAuthenticationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthenticationServiceServer) error

RegisterAuthenticationServiceHandlerServer registers the http handlers for service AuthenticationService to "mux". UnaryRPC :call AuthenticationServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthenticationServiceHandlerFromEndpoint instead.

func RegisterAuthenticationServiceServer

func RegisterAuthenticationServiceServer(s grpc.ServiceRegistrar, srv AuthenticationServiceServer)

Types

type Authentication

type Authentication struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Method    Method                 `protobuf:"varint,2,opt,name=method,proto3,enum=flipt.auth.Method" json:"method,omitempty"`
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Metadata  map[string]string      `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Authentication) Descriptor deprecated

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

Deprecated: Use Authentication.ProtoReflect.Descriptor instead.

func (*Authentication) GetCreatedAt

func (x *Authentication) GetCreatedAt() *timestamppb.Timestamp

func (*Authentication) GetExpiresAt

func (x *Authentication) GetExpiresAt() *timestamppb.Timestamp

func (*Authentication) GetId

func (x *Authentication) GetId() string

func (*Authentication) GetMetadata

func (x *Authentication) GetMetadata() map[string]string

func (*Authentication) GetMethod

func (x *Authentication) GetMethod() Method

func (*Authentication) GetUpdatedAt

func (x *Authentication) GetUpdatedAt() *timestamppb.Timestamp

func (*Authentication) ProtoMessage

func (*Authentication) ProtoMessage()

func (*Authentication) ProtoReflect

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

func (*Authentication) Reset

func (x *Authentication) Reset()

func (*Authentication) String

func (x *Authentication) String() string

type AuthenticationMethodTokenServiceClient

type AuthenticationMethodTokenServiceClient interface {
	CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error)
}

AuthenticationMethodTokenServiceClient is the client API for AuthenticationMethodTokenService 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 AuthenticationMethodTokenServiceServer

type AuthenticationMethodTokenServiceServer interface {
	CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
	// contains filtered or unexported methods
}

AuthenticationMethodTokenServiceServer is the server API for AuthenticationMethodTokenService service. All implementations must embed UnimplementedAuthenticationMethodTokenServiceServer for forward compatibility

type AuthenticationServiceClient

type AuthenticationServiceClient interface {
	GetAuthenticationSelf(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Authentication, error)
	GetAuthentication(ctx context.Context, in *GetAuthenticationRequest, opts ...grpc.CallOption) (*Authentication, error)
	ListAuthentications(ctx context.Context, in *ListAuthenticationsRequest, opts ...grpc.CallOption) (*ListAuthenticationsResponse, error)
	DeleteAuthentication(ctx context.Context, in *DeleteAuthenticationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AuthenticationServiceClient is the client API for AuthenticationService 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 AuthenticationServiceServer

type AuthenticationServiceServer interface {
	GetAuthenticationSelf(context.Context, *emptypb.Empty) (*Authentication, error)
	GetAuthentication(context.Context, *GetAuthenticationRequest) (*Authentication, error)
	ListAuthentications(context.Context, *ListAuthenticationsRequest) (*ListAuthenticationsResponse, error)
	DeleteAuthentication(context.Context, *DeleteAuthenticationRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AuthenticationServiceServer is the server API for AuthenticationService service. All implementations must embed UnimplementedAuthenticationServiceServer for forward compatibility

type CreateTokenRequest

type CreateTokenRequest struct {
	Name        string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string                 `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	ExpiresAt   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenRequest) Descriptor deprecated

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

Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenRequest) GetDescription

func (x *CreateTokenRequest) GetDescription() string

func (*CreateTokenRequest) GetExpiresAt

func (x *CreateTokenRequest) GetExpiresAt() *timestamppb.Timestamp

func (*CreateTokenRequest) GetName

func (x *CreateTokenRequest) GetName() string

func (*CreateTokenRequest) ProtoMessage

func (*CreateTokenRequest) ProtoMessage()

func (*CreateTokenRequest) ProtoReflect

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

func (*CreateTokenRequest) Reset

func (x *CreateTokenRequest) Reset()

func (*CreateTokenRequest) String

func (x *CreateTokenRequest) String() string

type CreateTokenResponse

type CreateTokenResponse struct {
	ClientToken    string          `protobuf:"bytes,1,opt,name=client_token,json=clientToken,proto3" json:"client_token,omitempty"`
	Authentication *Authentication `protobuf:"bytes,2,opt,name=authentication,proto3" json:"authentication,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenResponse) Descriptor deprecated

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

Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead.

func (*CreateTokenResponse) GetAuthentication

func (x *CreateTokenResponse) GetAuthentication() *Authentication

func (*CreateTokenResponse) GetClientToken

func (x *CreateTokenResponse) GetClientToken() string

func (*CreateTokenResponse) ProtoMessage

func (*CreateTokenResponse) ProtoMessage()

func (*CreateTokenResponse) ProtoReflect

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

func (*CreateTokenResponse) Reset

func (x *CreateTokenResponse) Reset()

func (*CreateTokenResponse) String

func (x *CreateTokenResponse) String() string

type DeleteAuthenticationRequest

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

func (*DeleteAuthenticationRequest) Descriptor deprecated

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

Deprecated: Use DeleteAuthenticationRequest.ProtoReflect.Descriptor instead.

func (*DeleteAuthenticationRequest) GetId

func (*DeleteAuthenticationRequest) ProtoMessage

func (*DeleteAuthenticationRequest) ProtoMessage()

func (*DeleteAuthenticationRequest) ProtoReflect

func (*DeleteAuthenticationRequest) Reset

func (x *DeleteAuthenticationRequest) Reset()

func (*DeleteAuthenticationRequest) String

func (x *DeleteAuthenticationRequest) String() string

type GetAuthenticationRequest

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

func (*GetAuthenticationRequest) Descriptor deprecated

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

Deprecated: Use GetAuthenticationRequest.ProtoReflect.Descriptor instead.

func (*GetAuthenticationRequest) GetId

func (x *GetAuthenticationRequest) GetId() string

func (*GetAuthenticationRequest) ProtoMessage

func (*GetAuthenticationRequest) ProtoMessage()

func (*GetAuthenticationRequest) ProtoReflect

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

func (*GetAuthenticationRequest) Reset

func (x *GetAuthenticationRequest) Reset()

func (*GetAuthenticationRequest) String

func (x *GetAuthenticationRequest) String() string

type ListAuthenticationsRequest

type ListAuthenticationsRequest struct {
	Method    Method `protobuf:"varint,1,opt,name=method,proto3,enum=flipt.auth.Method" json:"method,omitempty"`
	Limit     int32  `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAuthenticationsRequest) Descriptor deprecated

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

Deprecated: Use ListAuthenticationsRequest.ProtoReflect.Descriptor instead.

func (*ListAuthenticationsRequest) GetLimit

func (x *ListAuthenticationsRequest) GetLimit() int32

func (*ListAuthenticationsRequest) GetMethod

func (x *ListAuthenticationsRequest) GetMethod() Method

func (*ListAuthenticationsRequest) GetPageToken

func (x *ListAuthenticationsRequest) GetPageToken() string

func (*ListAuthenticationsRequest) ProtoMessage

func (*ListAuthenticationsRequest) ProtoMessage()

func (*ListAuthenticationsRequest) ProtoReflect

func (*ListAuthenticationsRequest) Reset

func (x *ListAuthenticationsRequest) Reset()

func (*ListAuthenticationsRequest) String

func (x *ListAuthenticationsRequest) String() string

type ListAuthenticationsResponse

type ListAuthenticationsResponse struct {
	Authentications []*Authentication `protobuf:"bytes,1,rep,name=authentications,proto3" json:"authentications,omitempty"`
	NextPageToken   string            `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAuthenticationsResponse) Descriptor deprecated

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

Deprecated: Use ListAuthenticationsResponse.ProtoReflect.Descriptor instead.

func (*ListAuthenticationsResponse) GetAuthentications

func (x *ListAuthenticationsResponse) GetAuthentications() []*Authentication

func (*ListAuthenticationsResponse) GetNextPageToken

func (x *ListAuthenticationsResponse) GetNextPageToken() string

func (*ListAuthenticationsResponse) ProtoMessage

func (*ListAuthenticationsResponse) ProtoMessage()

func (*ListAuthenticationsResponse) ProtoReflect

func (*ListAuthenticationsResponse) Reset

func (x *ListAuthenticationsResponse) Reset()

func (*ListAuthenticationsResponse) String

func (x *ListAuthenticationsResponse) String() string

type Method

type Method int32
const (
	Method_METHOD_NONE  Method = 0
	Method_METHOD_TOKEN Method = 1
)

func (Method) Descriptor

func (Method) Descriptor() protoreflect.EnumDescriptor

func (Method) Enum

func (x Method) Enum() *Method

func (Method) EnumDescriptor deprecated

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

Deprecated: Use Method.Descriptor instead.

func (Method) Number

func (x Method) Number() protoreflect.EnumNumber

func (Method) String

func (x Method) String() string

func (Method) Type

func (Method) Type() protoreflect.EnumType

type UnimplementedAuthenticationMethodTokenServiceServer

type UnimplementedAuthenticationMethodTokenServiceServer struct {
}

UnimplementedAuthenticationMethodTokenServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationMethodTokenServiceServer) CreateToken

type UnimplementedAuthenticationServiceServer

type UnimplementedAuthenticationServiceServer struct {
}

UnimplementedAuthenticationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationServiceServer) DeleteAuthentication

func (UnimplementedAuthenticationServiceServer) GetAuthentication

func (UnimplementedAuthenticationServiceServer) GetAuthenticationSelf

func (UnimplementedAuthenticationServiceServer) ListAuthentications

type UnsafeAuthenticationMethodTokenServiceServer

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

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

type UnsafeAuthenticationServiceServer

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

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

Jump to

Keyboard shortcuts

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