featureflagv1

package
v0.0.0-...-f507469 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package featureflagv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	FeatureFlagAPI_GetFlags_FullMethodName = "/clutch.featureflag.v1.FeatureFlagAPI/GetFlags"
)

Variables

View Source
var FeatureFlagAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "clutch.featureflag.v1.FeatureFlagAPI",
	HandlerType: (*FeatureFlagAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFlags",
			Handler:    _FeatureFlagAPI_GetFlags_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "featureflag/v1/featureflag.proto",
}

FeatureFlagAPI_ServiceDesc is the grpc.ServiceDesc for FeatureFlagAPI 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_featureflag_v1_featureflag_proto protoreflect.FileDescriptor

Functions

func RegisterFeatureFlagAPIHandler

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

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

func RegisterFeatureFlagAPIHandlerClient

func RegisterFeatureFlagAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FeatureFlagAPIClient) error

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

func RegisterFeatureFlagAPIHandlerFromEndpoint

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

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

func RegisterFeatureFlagAPIHandlerServer

func RegisterFeatureFlagAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FeatureFlagAPIServer) error

RegisterFeatureFlagAPIHandlerServer registers the http handlers for service FeatureFlagAPI to "mux". UnaryRPC :call FeatureFlagAPIServer 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 RegisterFeatureFlagAPIHandlerFromEndpoint instead.

func RegisterFeatureFlagAPIServer

func RegisterFeatureFlagAPIServer(s grpc.ServiceRegistrar, srv FeatureFlagAPIServer)

Types

type FeatureFlagAPIClient

type FeatureFlagAPIClient interface {
	GetFlags(ctx context.Context, in *GetFlagsRequest, opts ...grpc.CallOption) (*GetFlagsResponse, error)
}

FeatureFlagAPIClient is the client API for FeatureFlagAPI 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 FeatureFlagAPIServer

type FeatureFlagAPIServer interface {
	GetFlags(context.Context, *GetFlagsRequest) (*GetFlagsResponse, error)
}

FeatureFlagAPIServer is the server API for FeatureFlagAPI service. All implementations should embed UnimplementedFeatureFlagAPIServer for forward compatibility

type Flag

type Flag struct {

	// Types that are assignable to Type:
	//
	//	*Flag_BooleanValue
	Type isFlag_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

func (*Flag) Descriptor deprecated

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

Deprecated: Use Flag.ProtoReflect.Descriptor instead.

func (*Flag) GetBooleanValue

func (x *Flag) GetBooleanValue() bool

func (*Flag) GetType

func (m *Flag) GetType() isFlag_Type

func (*Flag) ProtoMessage

func (*Flag) ProtoMessage()

func (*Flag) ProtoReflect

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

func (*Flag) Reset

func (x *Flag) Reset()

func (*Flag) String

func (x *Flag) String() string

func (*Flag) Validate

func (m *Flag) Validate() error

Validate checks the field values on Flag with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Flag) ValidateAll

func (m *Flag) ValidateAll() error

ValidateAll checks the field values on Flag with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FlagMultiError, or nil if none found.

type FlagMultiError

type FlagMultiError []error

FlagMultiError is an error wrapping multiple validation errors returned by Flag.ValidateAll() if the designated constraints aren't met.

func (FlagMultiError) AllErrors

func (m FlagMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FlagMultiError) Error

func (m FlagMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type FlagValidationError

type FlagValidationError struct {
	// contains filtered or unexported fields
}

FlagValidationError is the validation error returned by Flag.Validate if the designated constraints aren't met.

func (FlagValidationError) Cause

func (e FlagValidationError) Cause() error

Cause function returns cause value.

func (FlagValidationError) Error

func (e FlagValidationError) Error() string

Error satisfies the builtin error interface

func (FlagValidationError) ErrorName

func (e FlagValidationError) ErrorName() string

ErrorName returns error name.

func (FlagValidationError) Field

func (e FlagValidationError) Field() string

Field function returns field value.

func (FlagValidationError) Key

func (e FlagValidationError) Key() bool

Key function returns key value.

func (FlagValidationError) Reason

func (e FlagValidationError) Reason() string

Reason function returns reason value.

type Flag_BooleanValue

type Flag_BooleanValue struct {
	BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
}

type GetFlagsRequest

type GetFlagsRequest struct {
	// contains filtered or unexported fields
}

func (*GetFlagsRequest) Descriptor deprecated

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

Deprecated: Use GetFlagsRequest.ProtoReflect.Descriptor instead.

func (*GetFlagsRequest) ProtoMessage

func (*GetFlagsRequest) ProtoMessage()

func (*GetFlagsRequest) ProtoReflect

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

func (*GetFlagsRequest) Reset

func (x *GetFlagsRequest) Reset()

func (*GetFlagsRequest) String

func (x *GetFlagsRequest) String() string

func (*GetFlagsRequest) Validate

func (m *GetFlagsRequest) Validate() error

Validate checks the field values on GetFlagsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetFlagsRequest) ValidateAll

func (m *GetFlagsRequest) ValidateAll() error

ValidateAll checks the field values on GetFlagsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetFlagsRequestMultiError, or nil if none found.

type GetFlagsRequestMultiError

type GetFlagsRequestMultiError []error

GetFlagsRequestMultiError is an error wrapping multiple validation errors returned by GetFlagsRequest.ValidateAll() if the designated constraints aren't met.

func (GetFlagsRequestMultiError) AllErrors

func (m GetFlagsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetFlagsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetFlagsRequestValidationError

type GetFlagsRequestValidationError struct {
	// contains filtered or unexported fields
}

GetFlagsRequestValidationError is the validation error returned by GetFlagsRequest.Validate if the designated constraints aren't met.

func (GetFlagsRequestValidationError) Cause

Cause function returns cause value.

func (GetFlagsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetFlagsRequestValidationError) ErrorName

func (e GetFlagsRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetFlagsRequestValidationError) Field

Field function returns field value.

func (GetFlagsRequestValidationError) Key

Key function returns key value.

func (GetFlagsRequestValidationError) Reason

Reason function returns reason value.

type GetFlagsResponse

type GetFlagsResponse struct {

	// Map of ID to flag.
	Flags map[string]*Flag `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetFlagsResponse) Descriptor deprecated

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

Deprecated: Use GetFlagsResponse.ProtoReflect.Descriptor instead.

func (*GetFlagsResponse) GetFlags

func (x *GetFlagsResponse) GetFlags() map[string]*Flag

func (*GetFlagsResponse) ProtoMessage

func (*GetFlagsResponse) ProtoMessage()

func (*GetFlagsResponse) ProtoReflect

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

func (*GetFlagsResponse) Reset

func (x *GetFlagsResponse) Reset()

func (*GetFlagsResponse) String

func (x *GetFlagsResponse) String() string

func (*GetFlagsResponse) Validate

func (m *GetFlagsResponse) Validate() error

Validate checks the field values on GetFlagsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetFlagsResponse) ValidateAll

func (m *GetFlagsResponse) ValidateAll() error

ValidateAll checks the field values on GetFlagsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetFlagsResponseMultiError, or nil if none found.

type GetFlagsResponseMultiError

type GetFlagsResponseMultiError []error

GetFlagsResponseMultiError is an error wrapping multiple validation errors returned by GetFlagsResponse.ValidateAll() if the designated constraints aren't met.

func (GetFlagsResponseMultiError) AllErrors

func (m GetFlagsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetFlagsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetFlagsResponseValidationError

type GetFlagsResponseValidationError struct {
	// contains filtered or unexported fields
}

GetFlagsResponseValidationError is the validation error returned by GetFlagsResponse.Validate if the designated constraints aren't met.

func (GetFlagsResponseValidationError) Cause

Cause function returns cause value.

func (GetFlagsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetFlagsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetFlagsResponseValidationError) Field

Field function returns field value.

func (GetFlagsResponseValidationError) Key

Key function returns key value.

func (GetFlagsResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedFeatureFlagAPIServer

type UnimplementedFeatureFlagAPIServer struct {
}

UnimplementedFeatureFlagAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedFeatureFlagAPIServer) GetFlags

type UnsafeFeatureFlagAPIServer

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

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

Jump to

Keyboard shortcuts

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