Documentation ¶
Overview ¶
Package featureflagv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterFeatureFlagAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFeatureFlagAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FeatureFlagAPIClient) error
- func RegisterFeatureFlagAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFeatureFlagAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FeatureFlagAPIServer) error
- func RegisterFeatureFlagAPIServer(s grpc.ServiceRegistrar, srv FeatureFlagAPIServer)
- type FeatureFlagAPIClient
- type FeatureFlagAPIServer
- type Flag
- func (*Flag) Descriptor() ([]byte, []int)deprecated
- func (x *Flag) GetBooleanValue() bool
- func (m *Flag) GetType() isFlag_Type
- func (*Flag) ProtoMessage()
- func (x *Flag) ProtoReflect() protoreflect.Message
- func (x *Flag) Reset()
- func (x *Flag) String() string
- func (m *Flag) Validate() error
- func (m *Flag) ValidateAll() error
- type FlagMultiError
- type FlagValidationError
- type Flag_BooleanValue
- type GetFlagsRequest
- func (*GetFlagsRequest) Descriptor() ([]byte, []int)deprecated
- func (*GetFlagsRequest) ProtoMessage()
- func (x *GetFlagsRequest) ProtoReflect() protoreflect.Message
- func (x *GetFlagsRequest) Reset()
- func (x *GetFlagsRequest) String() string
- func (m *GetFlagsRequest) Validate() error
- func (m *GetFlagsRequest) ValidateAll() error
- type GetFlagsRequestMultiError
- type GetFlagsRequestValidationError
- func (e GetFlagsRequestValidationError) Cause() error
- func (e GetFlagsRequestValidationError) Error() string
- func (e GetFlagsRequestValidationError) ErrorName() string
- func (e GetFlagsRequestValidationError) Field() string
- func (e GetFlagsRequestValidationError) Key() bool
- func (e GetFlagsRequestValidationError) Reason() string
- type GetFlagsResponse
- func (*GetFlagsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetFlagsResponse) GetFlags() map[string]*Flag
- func (*GetFlagsResponse) ProtoMessage()
- func (x *GetFlagsResponse) ProtoReflect() protoreflect.Message
- func (x *GetFlagsResponse) Reset()
- func (x *GetFlagsResponse) String() string
- func (m *GetFlagsResponse) Validate() error
- func (m *GetFlagsResponse) ValidateAll() error
- type GetFlagsResponseMultiError
- type GetFlagsResponseValidationError
- func (e GetFlagsResponseValidationError) Cause() error
- func (e GetFlagsResponseValidationError) Error() string
- func (e GetFlagsResponseValidationError) ErrorName() string
- func (e GetFlagsResponseValidationError) Field() string
- func (e GetFlagsResponseValidationError) Key() bool
- func (e GetFlagsResponseValidationError) Reason() string
- type UnimplementedFeatureFlagAPIServer
- type UnsafeFeatureFlagAPIServer
Constants ¶
const (
FeatureFlagAPI_GetFlags_FullMethodName = "/clutch.featureflag.v1.FeatureFlagAPI/GetFlags"
)
Variables ¶
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)
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.
func NewFeatureFlagAPIClient ¶
func NewFeatureFlagAPIClient(cc grpc.ClientConnInterface) FeatureFlagAPIClient
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) GetBooleanValue ¶
func (*Flag) ProtoMessage ¶
func (*Flag) ProtoMessage()
func (*Flag) ProtoReflect ¶
func (x *Flag) ProtoReflect() protoreflect.Message
func (*Flag) Validate ¶
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 ¶
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 ¶
func (m GetFlagsRequestMultiError) Error() string
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 ¶
func (e GetFlagsRequestValidationError) Cause() error
Cause function returns cause value.
func (GetFlagsRequestValidationError) Error ¶
func (e GetFlagsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetFlagsRequestValidationError) ErrorName ¶
func (e GetFlagsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetFlagsRequestValidationError) Field ¶
func (e GetFlagsRequestValidationError) Field() string
Field function returns field value.
func (GetFlagsRequestValidationError) Key ¶
func (e GetFlagsRequestValidationError) Key() bool
Key function returns key value.
func (GetFlagsRequestValidationError) Reason ¶
func (e GetFlagsRequestValidationError) Reason() string
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 ¶
func (m GetFlagsResponseMultiError) Error() string
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 ¶
func (e GetFlagsResponseValidationError) Cause() error
Cause function returns cause value.
func (GetFlagsResponseValidationError) Error ¶
func (e GetFlagsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetFlagsResponseValidationError) ErrorName ¶
func (e GetFlagsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetFlagsResponseValidationError) Field ¶
func (e GetFlagsResponseValidationError) Field() string
Field function returns field value.
func (GetFlagsResponseValidationError) Key ¶
func (e GetFlagsResponseValidationError) Key() bool
Key function returns key value.
func (GetFlagsResponseValidationError) Reason ¶
func (e GetFlagsResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedFeatureFlagAPIServer ¶
type UnimplementedFeatureFlagAPIServer struct { }
UnimplementedFeatureFlagAPIServer should be embedded to have forward compatible implementations.
func (UnimplementedFeatureFlagAPIServer) GetFlags ¶
func (UnimplementedFeatureFlagAPIServer) GetFlags(context.Context, *GetFlagsRequest) (*GetFlagsResponse, error)
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.