Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProviderServiceServer(s grpc.ServiceRegistrar, srv ProviderServiceServer)
- type DescriptionMethod
- func (*DescriptionMethod) Descriptor() ([]byte, []int)deprecated
- func (x *DescriptionMethod) GetAllowedHttpMethods() []HttpMethod
- func (x *DescriptionMethod) GetAuditEnabled() bool
- func (x *DescriptionMethod) GetMethod() string
- func (x *DescriptionMethod) GetRateLimiter() *RateLimiter
- func (x *DescriptionMethod) GetRequiredAuthentication() bool
- func (x *DescriptionMethod) GetRequiredPermissions() []string
- func (*DescriptionMethod) ProtoMessage()
- func (x *DescriptionMethod) ProtoReflect() protoreflect.Message
- func (x *DescriptionMethod) Reset()
- func (x *DescriptionMethod) String() string
- type DescriptionRequest
- type DescriptionResponse
- func (*DescriptionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DescriptionResponse) GetAuditEnabled() bool
- func (x *DescriptionResponse) GetMethods() []*DescriptionMethod
- func (x *DescriptionResponse) GetRateLimiter() *RateLimiter
- func (x *DescriptionResponse) GetRequiredAuthentication() bool
- func (x *DescriptionResponse) GetRequiredPermissions() []string
- func (*DescriptionResponse) ProtoMessage()
- func (x *DescriptionResponse) ProtoReflect() protoreflect.Message
- func (x *DescriptionResponse) Reset()
- func (x *DescriptionResponse) String() string
- type HeaderValue
- type HttpMethod
- type ProcessRequest
- func (*ProcessRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessRequest) GetApiMethod() string
- func (x *ProcessRequest) GetBody() []byte
- func (x *ProcessRequest) GetHeaders() map[string]*HeaderValue
- func (x *ProcessRequest) GetHttpMethod() HttpMethod
- func (x *ProcessRequest) GetPath() string
- func (x *ProcessRequest) GetQuery() string
- func (x *ProcessRequest) GetSubjectInformation() *SubjectInformation
- func (*ProcessRequest) ProtoMessage()
- func (x *ProcessRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessRequest) Reset()
- func (x *ProcessRequest) String() string
- type ProcessResponse
- func (*ProcessResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessResponse) GetBody() []byte
- func (x *ProcessResponse) GetHeaders() map[string]*HeaderValue
- func (x *ProcessResponse) GetStatusCode() uint32
- func (*ProcessResponse) ProtoMessage()
- func (x *ProcessResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessResponse) Reset()
- func (x *ProcessResponse) String() string
- type ProviderServiceClient
- type ProviderServiceServer
- type RateLimitBy
- func (RateLimitBy) Descriptor() protoreflect.EnumDescriptor
- func (x RateLimitBy) Enum() *RateLimitBy
- func (RateLimitBy) EnumDescriptor() ([]byte, []int)deprecated
- func (x RateLimitBy) Number() protoreflect.EnumNumber
- func (x RateLimitBy) String() string
- func (RateLimitBy) Type() protoreflect.EnumType
- type RateLimiter
- func (*RateLimiter) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimiter) GetBurst() uint64
- func (x *RateLimiter) GetBy() RateLimitBy
- func (x *RateLimiter) GetLimit() uint64
- func (x *RateLimiter) GetPeriod() *durationpb.Duration
- func (*RateLimiter) ProtoMessage()
- func (x *RateLimiter) ProtoReflect() protoreflect.Message
- func (x *RateLimiter) Reset()
- func (x *RateLimiter) String() string
- type SubjectInformation
- func (*SubjectInformation) Descriptor() ([]byte, []int)deprecated
- func (x *SubjectInformation) GetId() string
- func (x *SubjectInformation) GetPermissions() []string
- func (*SubjectInformation) ProtoMessage()
- func (x *SubjectInformation) ProtoReflect() protoreflect.Message
- func (x *SubjectInformation) Reset()
- func (x *SubjectInformation) String() string
- type UnimplementedProviderServiceServer
- type UnsafeProviderServiceServer
Constants ¶
const ( ProviderService_Description_FullMethodName = "/contract.v1.ProviderService/Description" ProviderService_Process_FullMethodName = "/contract.v1.ProviderService/Process" )
Variables ¶
var ( HttpMethod_name = map[int32]string{ 0: "HTTP_METHOD_UNSPECIFIED", 1: "HTTP_METHOD_GET", 2: "HTTP_METHOD_PUT", 3: "HTTP_METHOD_POST", 4: "HTTP_METHOD_DELETE", 5: "HTTP_METHOD_PATCH", } HttpMethod_value = map[string]int32{ "HTTP_METHOD_UNSPECIFIED": 0, "HTTP_METHOD_GET": 1, "HTTP_METHOD_PUT": 2, "HTTP_METHOD_POST": 3, "HTTP_METHOD_DELETE": 4, "HTTP_METHOD_PATCH": 5, } )
Enum value maps for HttpMethod.
var ( RateLimitBy_name = map[int32]string{ 0: "RATE_LIMIT_BY_UNSPECIFIED", 2: "RATE_LIMIT_BY_IP", 3: "RATE_LIMIT_BY_SUBJECT_ID", } RateLimitBy_value = map[string]int32{ "RATE_LIMIT_BY_UNSPECIFIED": 0, "RATE_LIMIT_BY_IP": 2, "RATE_LIMIT_BY_SUBJECT_ID": 3, } )
Enum value maps for RateLimitBy.
var File_contract_v1_provider_proto protoreflect.FileDescriptor
var ProviderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contract.v1.ProviderService", HandlerType: (*ProviderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Description", Handler: _ProviderService_Description_Handler, }, { MethodName: "Process", Handler: _ProviderService_Process_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "contract/v1/provider.proto", }
ProviderService_ServiceDesc is the grpc.ServiceDesc for ProviderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProviderServiceServer ¶
func RegisterProviderServiceServer(s grpc.ServiceRegistrar, srv ProviderServiceServer)
Types ¶
type DescriptionMethod ¶
type DescriptionMethod struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` AuditEnabled bool `protobuf:"varint,2,opt,name=audit_enabled,json=auditEnabled,proto3" json:"audit_enabled,omitempty"` RequiredAuthentication bool `` /* 128-byte string literal not displayed */ RateLimiter *RateLimiter `protobuf:"bytes,5,opt,name=rate_limiter,json=rateLimiter,proto3" json:"rate_limiter,omitempty"` RequiredPermissions []string `protobuf:"bytes,6,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` AllowedHttpMethods []HttpMethod `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*DescriptionMethod) Descriptor
deprecated
func (*DescriptionMethod) Descriptor() ([]byte, []int)
Deprecated: Use DescriptionMethod.ProtoReflect.Descriptor instead.
func (*DescriptionMethod) GetAllowedHttpMethods ¶
func (x *DescriptionMethod) GetAllowedHttpMethods() []HttpMethod
func (*DescriptionMethod) GetAuditEnabled ¶
func (x *DescriptionMethod) GetAuditEnabled() bool
func (*DescriptionMethod) GetMethod ¶
func (x *DescriptionMethod) GetMethod() string
func (*DescriptionMethod) GetRateLimiter ¶
func (x *DescriptionMethod) GetRateLimiter() *RateLimiter
func (*DescriptionMethod) GetRequiredAuthentication ¶
func (x *DescriptionMethod) GetRequiredAuthentication() bool
func (*DescriptionMethod) GetRequiredPermissions ¶
func (x *DescriptionMethod) GetRequiredPermissions() []string
func (*DescriptionMethod) ProtoMessage ¶
func (*DescriptionMethod) ProtoMessage()
func (*DescriptionMethod) ProtoReflect ¶
func (x *DescriptionMethod) ProtoReflect() protoreflect.Message
func (*DescriptionMethod) Reset ¶
func (x *DescriptionMethod) Reset()
func (*DescriptionMethod) String ¶
func (x *DescriptionMethod) String() string
type DescriptionRequest ¶
type DescriptionRequest struct {
// contains filtered or unexported fields
}
func (*DescriptionRequest) Descriptor
deprecated
func (*DescriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescriptionRequest.ProtoReflect.Descriptor instead.
func (*DescriptionRequest) ProtoMessage ¶
func (*DescriptionRequest) ProtoMessage()
func (*DescriptionRequest) ProtoReflect ¶
func (x *DescriptionRequest) ProtoReflect() protoreflect.Message
func (*DescriptionRequest) Reset ¶
func (x *DescriptionRequest) Reset()
func (*DescriptionRequest) String ¶
func (x *DescriptionRequest) String() string
type DescriptionResponse ¶
type DescriptionResponse struct { AuditEnabled bool `protobuf:"varint,1,opt,name=audit_enabled,json=auditEnabled,proto3" json:"audit_enabled,omitempty"` RequiredAuthentication bool `` /* 128-byte string literal not displayed */ RateLimiter *RateLimiter `protobuf:"bytes,4,opt,name=rate_limiter,json=rateLimiter,proto3" json:"rate_limiter,omitempty"` RequiredPermissions []string `protobuf:"bytes,5,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` Methods []*DescriptionMethod `protobuf:"bytes,6,rep,name=methods,proto3" json:"methods,omitempty"` // contains filtered or unexported fields }
func (*DescriptionResponse) Descriptor
deprecated
func (*DescriptionResponse) Descriptor() ([]byte, []int)
Deprecated: Use DescriptionResponse.ProtoReflect.Descriptor instead.
func (*DescriptionResponse) GetAuditEnabled ¶
func (x *DescriptionResponse) GetAuditEnabled() bool
func (*DescriptionResponse) GetMethods ¶
func (x *DescriptionResponse) GetMethods() []*DescriptionMethod
func (*DescriptionResponse) GetRateLimiter ¶
func (x *DescriptionResponse) GetRateLimiter() *RateLimiter
func (*DescriptionResponse) GetRequiredAuthentication ¶
func (x *DescriptionResponse) GetRequiredAuthentication() bool
func (*DescriptionResponse) GetRequiredPermissions ¶
func (x *DescriptionResponse) GetRequiredPermissions() []string
func (*DescriptionResponse) ProtoMessage ¶
func (*DescriptionResponse) ProtoMessage()
func (*DescriptionResponse) ProtoReflect ¶
func (x *DescriptionResponse) ProtoReflect() protoreflect.Message
func (*DescriptionResponse) Reset ¶
func (x *DescriptionResponse) Reset()
func (*DescriptionResponse) String ¶
func (x *DescriptionResponse) String() string
type HeaderValue ¶
type HeaderValue struct { Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*HeaderValue) Descriptor
deprecated
func (*HeaderValue) Descriptor() ([]byte, []int)
Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead.
func (*HeaderValue) GetValues ¶
func (x *HeaderValue) GetValues() []string
func (*HeaderValue) ProtoMessage ¶
func (*HeaderValue) ProtoMessage()
func (*HeaderValue) ProtoReflect ¶
func (x *HeaderValue) ProtoReflect() protoreflect.Message
func (*HeaderValue) Reset ¶
func (x *HeaderValue) Reset()
func (*HeaderValue) String ¶
func (x *HeaderValue) String() string
type HttpMethod ¶
type HttpMethod int32
const ( HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0 HttpMethod_HTTP_METHOD_GET HttpMethod = 1 HttpMethod_HTTP_METHOD_PUT HttpMethod = 2 HttpMethod_HTTP_METHOD_POST HttpMethod = 3 HttpMethod_HTTP_METHOD_DELETE HttpMethod = 4 HttpMethod_HTTP_METHOD_PATCH HttpMethod = 5 )
func (HttpMethod) Descriptor ¶
func (HttpMethod) Descriptor() protoreflect.EnumDescriptor
func (HttpMethod) Enum ¶
func (x HttpMethod) Enum() *HttpMethod
func (HttpMethod) EnumDescriptor
deprecated
func (HttpMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use HttpMethod.Descriptor instead.
func (HttpMethod) Number ¶
func (x HttpMethod) Number() protoreflect.EnumNumber
func (HttpMethod) String ¶
func (x HttpMethod) String() string
func (HttpMethod) Type ¶
func (HttpMethod) Type() protoreflect.EnumType
type ProcessRequest ¶
type ProcessRequest struct { ApiMethod string `protobuf:"bytes,1,opt,name=api_method,json=apiMethod,proto3" json:"api_method,omitempty"` HttpMethod HttpMethod `protobuf:"varint,2,opt,name=http_method,json=httpMethod,proto3,enum=contract.v1.HttpMethod" json:"http_method,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` Headers map[string]*HeaderValue `` /* 155-byte string literal not displayed */ SubjectInformation *SubjectInformation `protobuf:"bytes,7,opt,name=subject_information,json=subjectInformation,proto3" json:"subject_information,omitempty"` // contains filtered or unexported fields }
func (*ProcessRequest) Descriptor
deprecated
func (*ProcessRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessRequest.ProtoReflect.Descriptor instead.
func (*ProcessRequest) GetApiMethod ¶
func (x *ProcessRequest) GetApiMethod() string
func (*ProcessRequest) GetBody ¶
func (x *ProcessRequest) GetBody() []byte
func (*ProcessRequest) GetHeaders ¶
func (x *ProcessRequest) GetHeaders() map[string]*HeaderValue
func (*ProcessRequest) GetHttpMethod ¶
func (x *ProcessRequest) GetHttpMethod() HttpMethod
func (*ProcessRequest) GetPath ¶
func (x *ProcessRequest) GetPath() string
func (*ProcessRequest) GetQuery ¶
func (x *ProcessRequest) GetQuery() string
func (*ProcessRequest) GetSubjectInformation ¶
func (x *ProcessRequest) GetSubjectInformation() *SubjectInformation
func (*ProcessRequest) ProtoMessage ¶
func (*ProcessRequest) ProtoMessage()
func (*ProcessRequest) ProtoReflect ¶
func (x *ProcessRequest) ProtoReflect() protoreflect.Message
func (*ProcessRequest) Reset ¶
func (x *ProcessRequest) Reset()
func (*ProcessRequest) String ¶
func (x *ProcessRequest) String() string
type ProcessResponse ¶
type ProcessResponse struct { Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` StatusCode uint32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` Headers map[string]*HeaderValue `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ProcessResponse) Descriptor
deprecated
func (*ProcessResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessResponse.ProtoReflect.Descriptor instead.
func (*ProcessResponse) GetBody ¶
func (x *ProcessResponse) GetBody() []byte
func (*ProcessResponse) GetHeaders ¶
func (x *ProcessResponse) GetHeaders() map[string]*HeaderValue
func (*ProcessResponse) GetStatusCode ¶
func (x *ProcessResponse) GetStatusCode() uint32
func (*ProcessResponse) ProtoMessage ¶
func (*ProcessResponse) ProtoMessage()
func (*ProcessResponse) ProtoReflect ¶
func (x *ProcessResponse) ProtoReflect() protoreflect.Message
func (*ProcessResponse) Reset ¶
func (x *ProcessResponse) Reset()
func (*ProcessResponse) String ¶
func (x *ProcessResponse) String() string
type ProviderServiceClient ¶
type ProviderServiceClient interface { Description(ctx context.Context, in *DescriptionRequest, opts ...grpc.CallOption) (*DescriptionResponse, error) Process(ctx context.Context, in *ProcessRequest, opts ...grpc.CallOption) (*ProcessResponse, error) }
ProviderServiceClient is the client API for ProviderService 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 NewProviderServiceClient ¶
func NewProviderServiceClient(cc grpc.ClientConnInterface) ProviderServiceClient
type ProviderServiceServer ¶
type ProviderServiceServer interface { Description(context.Context, *DescriptionRequest) (*DescriptionResponse, error) Process(context.Context, *ProcessRequest) (*ProcessResponse, error) // contains filtered or unexported methods }
ProviderServiceServer is the server API for ProviderService service. All implementations must embed UnimplementedProviderServiceServer for forward compatibility
type RateLimitBy ¶
type RateLimitBy int32
const ( RateLimitBy_RATE_LIMIT_BY_UNSPECIFIED RateLimitBy = 0 RateLimitBy_RATE_LIMIT_BY_IP RateLimitBy = 2 RateLimitBy_RATE_LIMIT_BY_SUBJECT_ID RateLimitBy = 3 )
func (RateLimitBy) Descriptor ¶
func (RateLimitBy) Descriptor() protoreflect.EnumDescriptor
func (RateLimitBy) Enum ¶
func (x RateLimitBy) Enum() *RateLimitBy
func (RateLimitBy) EnumDescriptor
deprecated
func (RateLimitBy) EnumDescriptor() ([]byte, []int)
Deprecated: Use RateLimitBy.Descriptor instead.
func (RateLimitBy) Number ¶
func (x RateLimitBy) Number() protoreflect.EnumNumber
func (RateLimitBy) String ¶
func (x RateLimitBy) String() string
func (RateLimitBy) Type ¶
func (RateLimitBy) Type() protoreflect.EnumType
type RateLimiter ¶
type RateLimiter struct { By RateLimitBy `protobuf:"varint,1,opt,name=by,proto3,enum=contract.v1.RateLimitBy" json:"by,omitempty"` Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Burst uint64 `protobuf:"varint,3,opt,name=burst,proto3" json:"burst,omitempty"` Period *durationpb.Duration `protobuf:"bytes,4,opt,name=period,proto3" json:"period,omitempty"` // contains filtered or unexported fields }
func (*RateLimiter) Descriptor
deprecated
func (*RateLimiter) Descriptor() ([]byte, []int)
Deprecated: Use RateLimiter.ProtoReflect.Descriptor instead.
func (*RateLimiter) GetBurst ¶
func (x *RateLimiter) GetBurst() uint64
func (*RateLimiter) GetBy ¶
func (x *RateLimiter) GetBy() RateLimitBy
func (*RateLimiter) GetLimit ¶
func (x *RateLimiter) GetLimit() uint64
func (*RateLimiter) GetPeriod ¶
func (x *RateLimiter) GetPeriod() *durationpb.Duration
func (*RateLimiter) ProtoMessage ¶
func (*RateLimiter) ProtoMessage()
func (*RateLimiter) ProtoReflect ¶
func (x *RateLimiter) ProtoReflect() protoreflect.Message
func (*RateLimiter) Reset ¶
func (x *RateLimiter) Reset()
func (*RateLimiter) String ¶
func (x *RateLimiter) String() string
type SubjectInformation ¶
type SubjectInformation struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` // contains filtered or unexported fields }
func (*SubjectInformation) Descriptor
deprecated
func (*SubjectInformation) Descriptor() ([]byte, []int)
Deprecated: Use SubjectInformation.ProtoReflect.Descriptor instead.
func (*SubjectInformation) GetId ¶
func (x *SubjectInformation) GetId() string
func (*SubjectInformation) GetPermissions ¶
func (x *SubjectInformation) GetPermissions() []string
func (*SubjectInformation) ProtoMessage ¶
func (*SubjectInformation) ProtoMessage()
func (*SubjectInformation) ProtoReflect ¶
func (x *SubjectInformation) ProtoReflect() protoreflect.Message
func (*SubjectInformation) Reset ¶
func (x *SubjectInformation) Reset()
func (*SubjectInformation) String ¶
func (x *SubjectInformation) String() string
type UnimplementedProviderServiceServer ¶
type UnimplementedProviderServiceServer struct { }
UnimplementedProviderServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedProviderServiceServer) Description ¶
func (UnimplementedProviderServiceServer) Description(context.Context, *DescriptionRequest) (*DescriptionResponse, error)
func (UnimplementedProviderServiceServer) Process ¶
func (UnimplementedProviderServiceServer) Process(context.Context, *ProcessRequest) (*ProcessResponse, error)
type UnsafeProviderServiceServer ¶
type UnsafeProviderServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProviderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProviderServiceServer will result in compilation errors.