Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterOrgDirectoryServer(s grpc.ServiceRegistrar, srv OrgDirectoryServer)
- type OrgDirectoryClient
- type OrgDirectoryServer
- type OrgRecord
- func (*OrgRecord) Descriptor() ([]byte, []int)deprecated
- func (x *OrgRecord) GetGrpcAddr() string
- func (x *OrgRecord) GetName() string
- func (x *OrgRecord) GetNodeId() string
- func (x *OrgRecord) GetPublicKey() string
- func (x *OrgRecord) GetQuicAddr() string
- func (x *OrgRecord) GetRole() string
- func (*OrgRecord) ProtoMessage()
- func (x *OrgRecord) ProtoReflect() protoreflect.Message
- func (x *OrgRecord) Reset()
- func (x *OrgRecord) String() string
- type OrgRegisterRequest
- func (*OrgRegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OrgRegisterRequest) GetRecord() *OrgRecord
- func (*OrgRegisterRequest) ProtoMessage()
- func (x *OrgRegisterRequest) ProtoReflect() protoreflect.Message
- func (x *OrgRegisterRequest) Reset()
- func (x *OrgRegisterRequest) String() string
- type OrgRegisterResponse
- func (*OrgRegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OrgRegisterResponse) GetMessage() string
- func (x *OrgRegisterResponse) GetSuccess() bool
- func (*OrgRegisterResponse) ProtoMessage()
- func (x *OrgRegisterResponse) ProtoReflect() protoreflect.Message
- func (x *OrgRegisterResponse) Reset()
- func (x *OrgRegisterResponse) String() string
- type RecordsQueryRequest
- func (*RecordsQueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RecordsQueryRequest) GetName() string
- func (x *RecordsQueryRequest) GetRole() string
- func (*RecordsQueryRequest) ProtoMessage()
- func (x *RecordsQueryRequest) ProtoReflect() protoreflect.Message
- func (x *RecordsQueryRequest) Reset()
- func (x *RecordsQueryRequest) String() string
- type RecordsQueryResponse
- func (*RecordsQueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RecordsQueryResponse) GetRecords() []*OrgRecord
- func (*RecordsQueryResponse) ProtoMessage()
- func (x *RecordsQueryResponse) ProtoReflect() protoreflect.Message
- func (x *RecordsQueryResponse) Reset()
- func (x *RecordsQueryResponse) String() string
- type UnimplementedOrgDirectoryServer
- type UnsafeOrgDirectoryServer
Constants ¶
const ( OrgDirectory_RegisterOrg_FullMethodName = "/orgnode.v1.OrgDirectory/RegisterOrg" OrgDirectory_QueryOrgs_FullMethodName = "/orgnode.v1.OrgDirectory/QueryOrgs" )
Variables ¶
var File_api_proto_orgnode_v1_org_proto protoreflect.FileDescriptor
var OrgDirectory_ServiceDesc = grpc.ServiceDesc{ ServiceName: "orgnode.v1.OrgDirectory", HandlerType: (*OrgDirectoryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RegisterOrg", Handler: _OrgDirectory_RegisterOrg_Handler, }, { MethodName: "QueryOrgs", Handler: _OrgDirectory_QueryOrgs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/orgnode/v1/org.proto", }
OrgDirectory_ServiceDesc is the grpc.ServiceDesc for OrgDirectory service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrgDirectoryServer ¶
func RegisterOrgDirectoryServer(s grpc.ServiceRegistrar, srv OrgDirectoryServer)
Types ¶
type OrgDirectoryClient ¶
type OrgDirectoryClient interface {
RegisterOrg(ctx context.Context, in *OrgRegisterRequest, opts ...grpc.CallOption) (*OrgRegisterResponse, error)
QueryOrgs(ctx context.Context, in *RecordsQueryRequest, opts ...grpc.CallOption) (*RecordsQueryResponse, error)
}
OrgDirectoryClient is the client API for OrgDirectory 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 NewOrgDirectoryClient ¶
func NewOrgDirectoryClient(cc grpc.ClientConnInterface) OrgDirectoryClient
type OrgDirectoryServer ¶
type OrgDirectoryServer interface {
RegisterOrg(context.Context, *OrgRegisterRequest) (*OrgRegisterResponse, error)
QueryOrgs(context.Context, *RecordsQueryRequest) (*RecordsQueryResponse, error)
// contains filtered or unexported methods
}
OrgDirectoryServer is the server API for OrgDirectory service. All implementations must embed UnimplementedOrgDirectoryServer for forward compatibility.
type OrgRecord ¶
type OrgRecord struct {
NodeId string `protobuf:"bytes,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` // supplier | authority | ngo
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
QuicAddr string `protobuf:"bytes,4,opt,name=quicAddr,proto3" json:"quicAddr,omitempty"`
GrpcAddr string `protobuf:"bytes,5,opt,name=grpcAddr,proto3" json:"grpcAddr,omitempty"`
PublicKey string `protobuf:"bytes,6,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // PEM-encoded or hex-encoded pubkey
// contains filtered or unexported fields
}
func (*OrgRecord) Descriptor
deprecated
func (*OrgRecord) GetGrpcAddr ¶
func (*OrgRecord) GetPublicKey ¶
func (*OrgRecord) GetQuicAddr ¶
func (*OrgRecord) ProtoMessage ¶
func (*OrgRecord) ProtoMessage()
func (*OrgRecord) ProtoReflect ¶
func (x *OrgRecord) ProtoReflect() protoreflect.Message
type OrgRegisterRequest ¶
type OrgRegisterRequest struct {
Record *OrgRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
// contains filtered or unexported fields
}
func (*OrgRegisterRequest) Descriptor
deprecated
func (*OrgRegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use OrgRegisterRequest.ProtoReflect.Descriptor instead.
func (*OrgRegisterRequest) GetRecord ¶
func (x *OrgRegisterRequest) GetRecord() *OrgRecord
func (*OrgRegisterRequest) ProtoMessage ¶
func (*OrgRegisterRequest) ProtoMessage()
func (*OrgRegisterRequest) ProtoReflect ¶
func (x *OrgRegisterRequest) ProtoReflect() protoreflect.Message
func (*OrgRegisterRequest) Reset ¶
func (x *OrgRegisterRequest) Reset()
func (*OrgRegisterRequest) String ¶
func (x *OrgRegisterRequest) String() string
type OrgRegisterResponse ¶
type OrgRegisterResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*OrgRegisterResponse) Descriptor
deprecated
func (*OrgRegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use OrgRegisterResponse.ProtoReflect.Descriptor instead.
func (*OrgRegisterResponse) GetMessage ¶
func (x *OrgRegisterResponse) GetMessage() string
func (*OrgRegisterResponse) GetSuccess ¶
func (x *OrgRegisterResponse) GetSuccess() bool
func (*OrgRegisterResponse) ProtoMessage ¶
func (*OrgRegisterResponse) ProtoMessage()
func (*OrgRegisterResponse) ProtoReflect ¶
func (x *OrgRegisterResponse) ProtoReflect() protoreflect.Message
func (*OrgRegisterResponse) Reset ¶
func (x *OrgRegisterResponse) Reset()
func (*OrgRegisterResponse) String ¶
func (x *OrgRegisterResponse) String() string
type RecordsQueryRequest ¶
type RecordsQueryRequest struct {
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*RecordsQueryRequest) Descriptor
deprecated
func (*RecordsQueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecordsQueryRequest.ProtoReflect.Descriptor instead.
func (*RecordsQueryRequest) GetName ¶
func (x *RecordsQueryRequest) GetName() string
func (*RecordsQueryRequest) GetRole ¶
func (x *RecordsQueryRequest) GetRole() string
func (*RecordsQueryRequest) ProtoMessage ¶
func (*RecordsQueryRequest) ProtoMessage()
func (*RecordsQueryRequest) ProtoReflect ¶
func (x *RecordsQueryRequest) ProtoReflect() protoreflect.Message
func (*RecordsQueryRequest) Reset ¶
func (x *RecordsQueryRequest) Reset()
func (*RecordsQueryRequest) String ¶
func (x *RecordsQueryRequest) String() string
type RecordsQueryResponse ¶
type RecordsQueryResponse struct {
Records []*OrgRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// contains filtered or unexported fields
}
func (*RecordsQueryResponse) Descriptor
deprecated
func (*RecordsQueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use RecordsQueryResponse.ProtoReflect.Descriptor instead.
func (*RecordsQueryResponse) GetRecords ¶
func (x *RecordsQueryResponse) GetRecords() []*OrgRecord
func (*RecordsQueryResponse) ProtoMessage ¶
func (*RecordsQueryResponse) ProtoMessage()
func (*RecordsQueryResponse) ProtoReflect ¶
func (x *RecordsQueryResponse) ProtoReflect() protoreflect.Message
func (*RecordsQueryResponse) Reset ¶
func (x *RecordsQueryResponse) Reset()
func (*RecordsQueryResponse) String ¶
func (x *RecordsQueryResponse) String() string
type UnimplementedOrgDirectoryServer ¶
type UnimplementedOrgDirectoryServer struct{}
UnimplementedOrgDirectoryServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedOrgDirectoryServer) QueryOrgs ¶
func (UnimplementedOrgDirectoryServer) QueryOrgs(context.Context, *RecordsQueryRequest) (*RecordsQueryResponse, error)
func (UnimplementedOrgDirectoryServer) RegisterOrg ¶
func (UnimplementedOrgDirectoryServer) RegisterOrg(context.Context, *OrgRegisterRequest) (*OrgRegisterResponse, error)
type UnsafeOrgDirectoryServer ¶
type UnsafeOrgDirectoryServer interface {
// contains filtered or unexported methods
}
UnsafeOrgDirectoryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrgDirectoryServer will result in compilation errors.