Documentation
¶
Index ¶
- Variables
- func ApiPolicyServiceClientType() reflect.Type
- func ApiPolicyServiceHandlerType() reflect.Type
- func ApiPolicyServiceServerType() reflect.Type
- func RegisterApiPolicyServiceHandler(r http.Router, srv ApiPolicyServiceHandler, opts ...http.HandleOption)
- func RegisterApiPolicyServiceImp(regester transport.Register, srv ApiPolicyServiceServer, ...)
- func RegisterApiPolicyServiceServer(s grpc1.ServiceRegistrar, srv ApiPolicyServiceServer, ...)
- func ServiceNames(svr ...string) []string
- func Types() []reflect.Type
- type ApiPolicyServiceClient
- type ApiPolicyServiceHandler
- type ApiPolicyServiceServer
- type GetPolicyRequest
- func (*GetPolicyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPolicyRequest) GetApiId() string
- func (x *GetPolicyRequest) GetCategory() string
- func (x *GetPolicyRequest) GetPackageId() string
- func (m *GetPolicyRequest) MarshalJSON() ([]byte, error)
- func (*GetPolicyRequest) ProtoMessage()
- func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message
- func (x *GetPolicyRequest) Reset()
- func (x *GetPolicyRequest) String() string
- func (m *GetPolicyRequest) UnmarshalJSON(b []byte) error
- func (m *GetPolicyRequest) UnmarshalURLValues(prefix string, values url.Values) error
- func (this *GetPolicyRequest) Validate() error
- type GetPolicyResponse
- func (*GetPolicyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPolicyResponse) GetData() *structpb.Value
- func (m *GetPolicyResponse) MarshalJSON() ([]byte, error)
- func (*GetPolicyResponse) ProtoMessage()
- func (x *GetPolicyResponse) ProtoReflect() protoreflect.Message
- func (x *GetPolicyResponse) Reset()
- func (x *GetPolicyResponse) String() string
- func (m *GetPolicyResponse) UnmarshalJSON(b []byte) error
- func (m *GetPolicyResponse) UnmarshalURLValues(prefix string, values url.Values) error
- func (this *GetPolicyResponse) Validate() error
- type SetPolicyRequest
- func (*SetPolicyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetPolicyRequest) GetApiId() string
- func (x *SetPolicyRequest) GetBody() []byte
- func (x *SetPolicyRequest) GetCategory() string
- func (x *SetPolicyRequest) GetPackageId() string
- func (m *SetPolicyRequest) MarshalJSON() ([]byte, error)
- func (*SetPolicyRequest) ProtoMessage()
- func (x *SetPolicyRequest) ProtoReflect() protoreflect.Message
- func (x *SetPolicyRequest) Reset()
- func (x *SetPolicyRequest) String() string
- func (m *SetPolicyRequest) UnmarshalJSON(b []byte) error
- func (m *SetPolicyRequest) UnmarshalURLValues(prefix string, values url.Values) error
- func (this *SetPolicyRequest) Validate() error
- type SetPolicyResponse
- func (*SetPolicyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetPolicyResponse) GetData() *structpb.Value
- func (m *SetPolicyResponse) MarshalJSON() ([]byte, error)
- func (*SetPolicyResponse) ProtoMessage()
- func (x *SetPolicyResponse) ProtoReflect() protoreflect.Message
- func (x *SetPolicyResponse) Reset()
- func (x *SetPolicyResponse) String() string
- func (m *SetPolicyResponse) UnmarshalJSON(b []byte) error
- func (m *SetPolicyResponse) UnmarshalURLValues(prefix string, values url.Values) error
- func (this *SetPolicyResponse) Validate() error
- type UnimplementedApiPolicyServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_policy_proto protoreflect.FileDescriptor
Functions ¶
func ApiPolicyServiceClientType ¶
ApiPolicyServiceClientType .
func ApiPolicyServiceHandlerType ¶
ApiPolicyServiceHandlerType .
func ApiPolicyServiceServerType ¶
ApiPolicyServiceServerType .
func RegisterApiPolicyServiceHandler ¶
func RegisterApiPolicyServiceHandler(r http.Router, srv ApiPolicyServiceHandler, opts ...http.HandleOption)
RegisterApiPolicyServiceHandler register ApiPolicyServiceHandler to http.Router.
func RegisterApiPolicyServiceImp ¶
func RegisterApiPolicyServiceImp(regester transport.Register, srv ApiPolicyServiceServer, opts ...transport.ServiceOption)
RegisterApiPolicyServiceImp api_policy.proto
func RegisterApiPolicyServiceServer ¶
func RegisterApiPolicyServiceServer(s grpc1.ServiceRegistrar, srv ApiPolicyServiceServer, opts ...grpc1.HandleOption)
Types ¶
type ApiPolicyServiceClient ¶
type ApiPolicyServiceClient interface { GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) SetPolicy(ctx context.Context, in *SetPolicyRequest, opts ...grpc.CallOption) (*SetPolicyResponse, error) }
ApiPolicyServiceClient is the client API for ApiPolicyService 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 NewApiPolicyServiceClient ¶
func NewApiPolicyServiceClient(cc grpc1.ClientConnInterface) ApiPolicyServiceClient
type ApiPolicyServiceHandler ¶
type ApiPolicyServiceHandler interface { // GET /api/gateway/policies/{category} GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) // PUT /api/gateway/policies/{category} SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error) }
ApiPolicyServiceHandler is the server API for ApiPolicyService service.
type ApiPolicyServiceServer ¶
type ApiPolicyServiceServer interface { GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error) }
ApiPolicyServiceServer is the server API for ApiPolicyService service. All implementations should embed UnimplementedApiPolicyServiceServer for forward compatibility
type GetPolicyRequest ¶
type GetPolicyRequest struct { Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` PackageId string `protobuf:"bytes,2,opt,name=packageId,proto3" json:"packageId,omitempty"` ApiId string `protobuf:"bytes,3,opt,name=apiId,proto3" json:"apiId,omitempty"` // contains filtered or unexported fields }
func (*GetPolicyRequest) Descriptor
deprecated
func (*GetPolicyRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPolicyRequest.ProtoReflect.Descriptor instead.
func (*GetPolicyRequest) GetApiId ¶
func (x *GetPolicyRequest) GetApiId() string
func (*GetPolicyRequest) GetCategory ¶
func (x *GetPolicyRequest) GetCategory() string
func (*GetPolicyRequest) GetPackageId ¶
func (x *GetPolicyRequest) GetPackageId() string
func (*GetPolicyRequest) MarshalJSON ¶
func (m *GetPolicyRequest) MarshalJSON() ([]byte, error)
GetPolicyRequest implement json.Marshaler.
func (*GetPolicyRequest) ProtoMessage ¶
func (*GetPolicyRequest) ProtoMessage()
func (*GetPolicyRequest) ProtoReflect ¶
func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message
func (*GetPolicyRequest) Reset ¶
func (x *GetPolicyRequest) Reset()
func (*GetPolicyRequest) String ¶
func (x *GetPolicyRequest) String() string
func (*GetPolicyRequest) UnmarshalJSON ¶
func (m *GetPolicyRequest) UnmarshalJSON(b []byte) error
GetPolicyRequest implement json.Marshaler.
func (*GetPolicyRequest) UnmarshalURLValues ¶
func (m *GetPolicyRequest) UnmarshalURLValues(prefix string, values url.Values) error
GetPolicyRequest implement urlenc.URLValuesUnmarshaler.
func (*GetPolicyRequest) Validate ¶
func (this *GetPolicyRequest) Validate() error
type GetPolicyResponse ¶
type GetPolicyResponse struct { Data *structpb.Value `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*GetPolicyResponse) Descriptor
deprecated
func (*GetPolicyResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPolicyResponse.ProtoReflect.Descriptor instead.
func (*GetPolicyResponse) GetData ¶
func (x *GetPolicyResponse) GetData() *structpb.Value
func (*GetPolicyResponse) MarshalJSON ¶
func (m *GetPolicyResponse) MarshalJSON() ([]byte, error)
GetPolicyResponse implement json.Marshaler.
func (*GetPolicyResponse) ProtoMessage ¶
func (*GetPolicyResponse) ProtoMessage()
func (*GetPolicyResponse) ProtoReflect ¶
func (x *GetPolicyResponse) ProtoReflect() protoreflect.Message
func (*GetPolicyResponse) Reset ¶
func (x *GetPolicyResponse) Reset()
func (*GetPolicyResponse) String ¶
func (x *GetPolicyResponse) String() string
func (*GetPolicyResponse) UnmarshalJSON ¶
func (m *GetPolicyResponse) UnmarshalJSON(b []byte) error
GetPolicyResponse implement json.Marshaler.
func (*GetPolicyResponse) UnmarshalURLValues ¶
func (m *GetPolicyResponse) UnmarshalURLValues(prefix string, values url.Values) error
GetPolicyResponse implement urlenc.URLValuesUnmarshaler.
func (*GetPolicyResponse) Validate ¶
func (this *GetPolicyResponse) Validate() error
type SetPolicyRequest ¶
type SetPolicyRequest struct { Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` PackageId string `protobuf:"bytes,2,opt,name=packageId,proto3" json:"packageId,omitempty"` ApiId string `protobuf:"bytes,3,opt,name=apiId,proto3" json:"apiId,omitempty"` Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*SetPolicyRequest) Descriptor
deprecated
func (*SetPolicyRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetPolicyRequest.ProtoReflect.Descriptor instead.
func (*SetPolicyRequest) GetApiId ¶
func (x *SetPolicyRequest) GetApiId() string
func (*SetPolicyRequest) GetBody ¶
func (x *SetPolicyRequest) GetBody() []byte
func (*SetPolicyRequest) GetCategory ¶
func (x *SetPolicyRequest) GetCategory() string
func (*SetPolicyRequest) GetPackageId ¶
func (x *SetPolicyRequest) GetPackageId() string
func (*SetPolicyRequest) MarshalJSON ¶
func (m *SetPolicyRequest) MarshalJSON() ([]byte, error)
SetPolicyRequest implement json.Marshaler.
func (*SetPolicyRequest) ProtoMessage ¶
func (*SetPolicyRequest) ProtoMessage()
func (*SetPolicyRequest) ProtoReflect ¶
func (x *SetPolicyRequest) ProtoReflect() protoreflect.Message
func (*SetPolicyRequest) Reset ¶
func (x *SetPolicyRequest) Reset()
func (*SetPolicyRequest) String ¶
func (x *SetPolicyRequest) String() string
func (*SetPolicyRequest) UnmarshalJSON ¶
func (m *SetPolicyRequest) UnmarshalJSON(b []byte) error
SetPolicyRequest implement json.Marshaler.
func (*SetPolicyRequest) UnmarshalURLValues ¶
func (m *SetPolicyRequest) UnmarshalURLValues(prefix string, values url.Values) error
SetPolicyRequest implement urlenc.URLValuesUnmarshaler.
func (*SetPolicyRequest) Validate ¶
func (this *SetPolicyRequest) Validate() error
type SetPolicyResponse ¶
type SetPolicyResponse struct { Data *structpb.Value `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*SetPolicyResponse) Descriptor
deprecated
func (*SetPolicyResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetPolicyResponse.ProtoReflect.Descriptor instead.
func (*SetPolicyResponse) GetData ¶
func (x *SetPolicyResponse) GetData() *structpb.Value
func (*SetPolicyResponse) MarshalJSON ¶
func (m *SetPolicyResponse) MarshalJSON() ([]byte, error)
SetPolicyResponse implement json.Marshaler.
func (*SetPolicyResponse) ProtoMessage ¶
func (*SetPolicyResponse) ProtoMessage()
func (*SetPolicyResponse) ProtoReflect ¶
func (x *SetPolicyResponse) ProtoReflect() protoreflect.Message
func (*SetPolicyResponse) Reset ¶
func (x *SetPolicyResponse) Reset()
func (*SetPolicyResponse) String ¶
func (x *SetPolicyResponse) String() string
func (*SetPolicyResponse) UnmarshalJSON ¶
func (m *SetPolicyResponse) UnmarshalJSON(b []byte) error
SetPolicyResponse implement json.Marshaler.
func (*SetPolicyResponse) UnmarshalURLValues ¶
func (m *SetPolicyResponse) UnmarshalURLValues(prefix string, values url.Values) error
SetPolicyResponse implement urlenc.URLValuesUnmarshaler.
func (*SetPolicyResponse) Validate ¶
func (this *SetPolicyResponse) Validate() error
type UnimplementedApiPolicyServiceServer ¶
type UnimplementedApiPolicyServiceServer struct { }
UnimplementedApiPolicyServiceServer should be embedded to have forward compatible implementations.
func (*UnimplementedApiPolicyServiceServer) GetPolicy ¶
func (*UnimplementedApiPolicyServiceServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error)
func (*UnimplementedApiPolicyServiceServer) SetPolicy ¶
func (*UnimplementedApiPolicyServiceServer) SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error)