Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPolicyHTTPServer(s *http.Server, srv PolicyHTTPServer)
- func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer)
- type CreatePolicyReply
- func (*CreatePolicyReply) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePolicyReply) GetCreateAt() *timestamppb.Timestamp
- func (x *CreatePolicyReply) GetExtendShadow() map[string]*anypb.Any
- func (x *CreatePolicyReply) GetId() uint64
- func (x *CreatePolicyReply) GetInstanceID() string
- func (x *CreatePolicyReply) GetName() string
- func (x *CreatePolicyReply) GetUpdateAt() *timestamppb.Timestamp
- func (*CreatePolicyReply) ProtoMessage()
- func (x *CreatePolicyReply) ProtoReflect() protoreflect.Message
- func (x *CreatePolicyReply) Reset()
- func (x *CreatePolicyReply) String() string
- type CreatePolicyRequest
- func (*CreatePolicyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePolicyRequest) GetMeta() *v1.ObjectMeta
- func (x *CreatePolicyRequest) GetUsername() string
- func (*CreatePolicyRequest) ProtoMessage()
- func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message
- func (x *CreatePolicyRequest) Reset()
- func (x *CreatePolicyRequest) String() string
- type HelloReply
- type HelloRequest
- type PolicyClient
- type PolicyHTTPClient
- type PolicyHTTPClientImpl
- type PolicyHTTPServer
- type PolicyServer
- type UnimplementedPolicyServer
- type UnsafePolicyServer
Constants ¶
const ( Policy_SayHello_FullMethodName = "/policy.v1.Policy/SayHello" Policy_Create_FullMethodName = "/policy.v1.Policy/Create" )
const OperationPolicyCreate = "/policy.v1.Policy/Create"
const OperationPolicySayHello = "/policy.v1.Policy/SayHello"
Variables ¶
var File_policy_v1_policy_proto protoreflect.FileDescriptor
var Policy_ServiceDesc = grpc.ServiceDesc{ ServiceName: "policy.v1.Policy", HandlerType: (*PolicyServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Policy_SayHello_Handler, }, { MethodName: "Create", Handler: _Policy_Create_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "policy/v1/policy.proto", }
Policy_ServiceDesc is the grpc.ServiceDesc for Policy service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPolicyHTTPServer ¶
func RegisterPolicyHTTPServer(s *http.Server, srv PolicyHTTPServer)
func RegisterPolicyServer ¶
func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer)
Types ¶
type CreatePolicyReply ¶
type CreatePolicyReply struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` InstanceID string `protobuf:"bytes,2,opt,name=instanceID,proto3" json:"instanceID,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` ExtendShadow map[string]*anypb.Any `` /* 165-byte string literal not displayed */ CreateAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createAt,proto3" json:"createAt,omitempty"` UpdateAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updateAt,proto3" json:"updateAt,omitempty"` // contains filtered or unexported fields }
func (*CreatePolicyReply) Descriptor
deprecated
func (*CreatePolicyReply) Descriptor() ([]byte, []int)
Deprecated: Use CreatePolicyReply.ProtoReflect.Descriptor instead.
func (*CreatePolicyReply) GetCreateAt ¶
func (x *CreatePolicyReply) GetCreateAt() *timestamppb.Timestamp
func (*CreatePolicyReply) GetExtendShadow ¶
func (x *CreatePolicyReply) GetExtendShadow() map[string]*anypb.Any
func (*CreatePolicyReply) GetId ¶
func (x *CreatePolicyReply) GetId() uint64
func (*CreatePolicyReply) GetInstanceID ¶
func (x *CreatePolicyReply) GetInstanceID() string
func (*CreatePolicyReply) GetName ¶
func (x *CreatePolicyReply) GetName() string
func (*CreatePolicyReply) GetUpdateAt ¶
func (x *CreatePolicyReply) GetUpdateAt() *timestamppb.Timestamp
func (*CreatePolicyReply) ProtoMessage ¶
func (*CreatePolicyReply) ProtoMessage()
func (*CreatePolicyReply) ProtoReflect ¶
func (x *CreatePolicyReply) ProtoReflect() protoreflect.Message
func (*CreatePolicyReply) Reset ¶
func (x *CreatePolicyReply) Reset()
func (*CreatePolicyReply) String ¶
func (x *CreatePolicyReply) String() string
type CreatePolicyRequest ¶
type CreatePolicyRequest struct { Meta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*CreatePolicyRequest) Descriptor
deprecated
func (*CreatePolicyRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePolicyRequest.ProtoReflect.Descriptor instead.
func (*CreatePolicyRequest) GetMeta ¶
func (x *CreatePolicyRequest) GetMeta() *v1.ObjectMeta
func (*CreatePolicyRequest) GetUsername ¶
func (x *CreatePolicyRequest) GetUsername() string
func (*CreatePolicyRequest) ProtoMessage ¶
func (*CreatePolicyRequest) ProtoMessage()
func (*CreatePolicyRequest) ProtoReflect ¶
func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message
func (*CreatePolicyRequest) Reset ¶
func (x *CreatePolicyRequest) Reset()
func (*CreatePolicyRequest) String ¶
func (x *CreatePolicyRequest) String() string
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type PolicyClient ¶
type PolicyClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) Create(ctx context.Context, in *CreatePolicyRequest, opts ...grpc.CallOption) (*CreatePolicyReply, error) }
PolicyClient is the client API for Policy 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 NewPolicyClient ¶
func NewPolicyClient(cc grpc.ClientConnInterface) PolicyClient
type PolicyHTTPClient ¶
type PolicyHTTPClient interface { Create(ctx context.Context, req *CreatePolicyRequest, opts ...http.CallOption) (rsp *CreatePolicyReply, err error) SayHello(ctx context.Context, req *HelloRequest, opts ...http.CallOption) (rsp *HelloReply, err error) }
func NewPolicyHTTPClient ¶
func NewPolicyHTTPClient(client *http.Client) PolicyHTTPClient
type PolicyHTTPClientImpl ¶
type PolicyHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*PolicyHTTPClientImpl) Create ¶
func (c *PolicyHTTPClientImpl) Create(ctx context.Context, in *CreatePolicyRequest, opts ...http.CallOption) (*CreatePolicyReply, error)
func (*PolicyHTTPClientImpl) SayHello ¶
func (c *PolicyHTTPClientImpl) SayHello(ctx context.Context, in *HelloRequest, opts ...http.CallOption) (*HelloReply, error)
type PolicyHTTPServer ¶
type PolicyHTTPServer interface { Create(context.Context, *CreatePolicyRequest) (*CreatePolicyReply, error) // SayHello Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) }
type PolicyServer ¶
type PolicyServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) Create(context.Context, *CreatePolicyRequest) (*CreatePolicyReply, error) // contains filtered or unexported methods }
PolicyServer is the server API for Policy service. All implementations must embed UnimplementedPolicyServer for forward compatibility
type UnimplementedPolicyServer ¶
type UnimplementedPolicyServer struct { }
UnimplementedPolicyServer must be embedded to have forward compatible implementations.
func (UnimplementedPolicyServer) Create ¶
func (UnimplementedPolicyServer) Create(context.Context, *CreatePolicyRequest) (*CreatePolicyReply, error)
func (UnimplementedPolicyServer) SayHello ¶
func (UnimplementedPolicyServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
type UnsafePolicyServer ¶
type UnsafePolicyServer interface {
// contains filtered or unexported methods
}
UnsafePolicyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PolicyServer will result in compilation errors.