directorytypes

package
v2.468.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Overview

Package directorytypes is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	DirectoryService_Register_FullMethodName   = "/berty.directory.v1.DirectoryService/Register"
	DirectoryService_Query_FullMethodName      = "/berty.directory.v1.DirectoryService/Query"
	DirectoryService_Unregister_FullMethodName = "/berty.directory.v1.DirectoryService/Unregister"
)

Variables

View Source
var DirectoryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "berty.directory.v1.DirectoryService",
	HandlerType: (*DirectoryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _DirectoryService_Register_Handler,
		},
		{
			MethodName: "Unregister",
			Handler:    _DirectoryService_Unregister_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Query",
			Handler:       _DirectoryService_Query_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "directorytypes/bertydirectory.proto",
}

DirectoryService_ServiceDesc is the grpc.ServiceDesc for DirectoryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterDirectoryServiceHandler

func RegisterDirectoryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDirectoryServiceHandler registers the http handlers for service DirectoryService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDirectoryServiceHandlerClient

func RegisterDirectoryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DirectoryServiceClient) error

RegisterDirectoryServiceHandlerClient registers the http handlers for service DirectoryService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DirectoryServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DirectoryServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DirectoryServiceClient" to call the correct interceptors.

func RegisterDirectoryServiceHandlerFromEndpoint

func RegisterDirectoryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDirectoryServiceHandlerFromEndpoint is same as RegisterDirectoryServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterDirectoryServiceHandlerServer

func RegisterDirectoryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DirectoryServiceServer) error

RegisterDirectoryServiceHandlerServer registers the http handlers for service DirectoryService to "mux". UnaryRPC :call DirectoryServiceServer 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 RegisterDirectoryServiceHandlerFromEndpoint instead.

func RegisterDirectoryServiceServer

func RegisterDirectoryServiceServer(s grpc.ServiceRegistrar, srv DirectoryServiceServer)

Types

type DirectoryServiceClient

type DirectoryServiceClient interface {
	Register(ctx context.Context, in *Register_Request, opts ...grpc.CallOption) (*Register_Reply, error)
	Query(ctx context.Context, in *Query_Request, opts ...grpc.CallOption) (DirectoryService_QueryClient, error)
	Unregister(ctx context.Context, in *Unregister_Request, opts ...grpc.CallOption) (*Unregister_Reply, error)
}

DirectoryServiceClient is the client API for DirectoryService 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.

type DirectoryServiceServer

type DirectoryServiceServer interface {
	Register(context.Context, *Register_Request) (*Register_Reply, error)
	Query(*Query_Request, DirectoryService_QueryServer) error
	Unregister(context.Context, *Unregister_Request) (*Unregister_Reply, error)
	// contains filtered or unexported methods
}

DirectoryServiceServer is the server API for DirectoryService service. All implementations must embed UnimplementedDirectoryServiceServer for forward compatibility

type DirectoryService_QueryClient

type DirectoryService_QueryClient interface {
	Recv() (*Query_Reply, error)
	grpc.ClientStream
}

type DirectoryService_QueryServer

type DirectoryService_QueryServer interface {
	Send(*Query_Reply) error
	grpc.ServerStream
}

type Query

type Query struct {
}

func (*Query) Descriptor

func (*Query) Descriptor() ([]byte, []int)

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (m *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type Query_Reply

type Query_Reply struct {
	DirectoryIdentifier string `protobuf:"bytes,1,opt,name=directory_identifier,json=directoryIdentifier,proto3" json:"directory_identifier,omitempty"`
	ExpiresAt           int64  `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	AccountURI          string `protobuf:"bytes,3,opt,name=account_uri,json=accountUri,proto3" json:"account_uri,omitempty"`
	VerifiedCredential  []byte `protobuf:"bytes,4,opt,name=verified_credential,json=verifiedCredential,proto3" json:"verified_credential,omitempty"`
}

func (*Query_Reply) Descriptor

func (*Query_Reply) Descriptor() ([]byte, []int)

func (*Query_Reply) GetAccountURI added in v2.452.0

func (m *Query_Reply) GetAccountURI() string

func (*Query_Reply) GetDirectoryIdentifier

func (m *Query_Reply) GetDirectoryIdentifier() string

func (*Query_Reply) GetExpiresAt

func (m *Query_Reply) GetExpiresAt() int64

func (*Query_Reply) GetVerifiedCredential

func (m *Query_Reply) GetVerifiedCredential() []byte

func (*Query_Reply) ProtoMessage

func (*Query_Reply) ProtoMessage()

func (*Query_Reply) Reset

func (m *Query_Reply) Reset()

func (*Query_Reply) String

func (m *Query_Reply) String() string

func (*Query_Reply) XXX_DiscardUnknown

func (m *Query_Reply) XXX_DiscardUnknown()

func (*Query_Reply) XXX_Marshal

func (m *Query_Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query_Reply) XXX_Merge

func (m *Query_Reply) XXX_Merge(src proto.Message)

func (*Query_Reply) XXX_Size

func (m *Query_Reply) XXX_Size() int

func (*Query_Reply) XXX_Unmarshal

func (m *Query_Reply) XXX_Unmarshal(b []byte) error

type Query_Request

type Query_Request struct {
	DirectoryIdentifiers []string `protobuf:"bytes,1,rep,name=directory_identifiers,json=directoryIdentifiers,proto3" json:"directory_identifiers,omitempty"`
}

func (*Query_Request) Descriptor

func (*Query_Request) Descriptor() ([]byte, []int)

func (*Query_Request) GetDirectoryIdentifiers

func (m *Query_Request) GetDirectoryIdentifiers() []string

func (*Query_Request) ProtoMessage

func (*Query_Request) ProtoMessage()

func (*Query_Request) Reset

func (m *Query_Request) Reset()

func (*Query_Request) String

func (m *Query_Request) String() string

func (*Query_Request) XXX_DiscardUnknown

func (m *Query_Request) XXX_DiscardUnknown()

func (*Query_Request) XXX_Marshal

func (m *Query_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query_Request) XXX_Merge

func (m *Query_Request) XXX_Merge(src proto.Message)

func (*Query_Request) XXX_Size

func (m *Query_Request) XXX_Size() int

func (*Query_Request) XXX_Unmarshal

func (m *Query_Request) XXX_Unmarshal(b []byte) error

type Record

type Record struct {
	DirectoryIdentifier  string `` /* 162-byte string literal not displayed */
	DirectoryRecordToken string `protobuf:"bytes,2,opt,name=directory_record_token,json=directoryRecordToken,proto3" json:"directory_record_token,omitempty"`
	ExpiresAt            int64  `protobuf:"varint,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	LockedUntil          int64  `protobuf:"varint,4,opt,name=locked_until,json=lockedUntil,proto3" json:"locked_until,omitempty"`
	UnregisterToken      string `protobuf:"bytes,5,opt,name=unregister_token,json=unregisterToken,proto3" json:"unregister_token,omitempty"`
	AccountURI           string `protobuf:"bytes,6,opt,name=account_uri,json=accountUri,proto3" json:"account_uri,omitempty"`
	VerifiedCredential   []byte `protobuf:"bytes,7,opt,name=verified_credential,json=verifiedCredential,proto3" json:"verified_credential,omitempty"`
}

func (*Record) Descriptor

func (*Record) Descriptor() ([]byte, []int)

func (*Record) GetAccountURI added in v2.452.0

func (m *Record) GetAccountURI() string

func (*Record) GetDirectoryIdentifier

func (m *Record) GetDirectoryIdentifier() string

func (*Record) GetDirectoryRecordToken

func (m *Record) GetDirectoryRecordToken() string

func (*Record) GetExpiresAt

func (m *Record) GetExpiresAt() int64

func (*Record) GetLockedUntil

func (m *Record) GetLockedUntil() int64

func (*Record) GetUnregisterToken added in v2.452.0

func (m *Record) GetUnregisterToken() string

func (*Record) GetVerifiedCredential

func (m *Record) GetVerifiedCredential() []byte

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) String

func (m *Record) String() string

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Record) XXX_Merge

func (m *Record) XXX_Merge(src proto.Message)

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

func (m *Record) XXX_Unmarshal(b []byte) error

type Register

type Register struct {
}

func (*Register) Descriptor

func (*Register) Descriptor() ([]byte, []int)

func (*Register) ProtoMessage

func (*Register) ProtoMessage()

func (*Register) Reset

func (m *Register) Reset()

func (*Register) String

func (m *Register) String() string

func (*Register) XXX_DiscardUnknown

func (m *Register) XXX_DiscardUnknown()

func (*Register) XXX_Marshal

func (m *Register) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Register) XXX_Merge

func (m *Register) XXX_Merge(src proto.Message)

func (*Register) XXX_Size

func (m *Register) XXX_Size() int

func (*Register) XXX_Unmarshal

func (m *Register) XXX_Unmarshal(b []byte) error

type Register_Reply

type Register_Reply struct {
	DirectoryRecordToken string `protobuf:"bytes,1,opt,name=directory_record_token,json=directoryRecordToken,proto3" json:"directory_record_token,omitempty"`
	DirectoryIdentifier  string `protobuf:"bytes,2,opt,name=directory_identifier,json=directoryIdentifier,proto3" json:"directory_identifier,omitempty"`
	ExpirationDate       int64  `protobuf:"varint,3,opt,name=expiration_date,json=expirationDate,proto3" json:"expiration_date,omitempty"`
	UnregisterToken      string `protobuf:"bytes,4,opt,name=unregister_token,json=unregisterToken,proto3" json:"unregister_token,omitempty"`
}

func (*Register_Reply) Descriptor

func (*Register_Reply) Descriptor() ([]byte, []int)

func (*Register_Reply) GetDirectoryIdentifier

func (m *Register_Reply) GetDirectoryIdentifier() string

func (*Register_Reply) GetDirectoryRecordToken

func (m *Register_Reply) GetDirectoryRecordToken() string

func (*Register_Reply) GetExpirationDate

func (m *Register_Reply) GetExpirationDate() int64

func (*Register_Reply) GetUnregisterToken added in v2.452.0

func (m *Register_Reply) GetUnregisterToken() string

func (*Register_Reply) ProtoMessage

func (*Register_Reply) ProtoMessage()

func (*Register_Reply) Reset

func (m *Register_Reply) Reset()

func (*Register_Reply) String

func (m *Register_Reply) String() string

func (*Register_Reply) XXX_DiscardUnknown

func (m *Register_Reply) XXX_DiscardUnknown()

func (*Register_Reply) XXX_Marshal

func (m *Register_Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Register_Reply) XXX_Merge

func (m *Register_Reply) XXX_Merge(src proto.Message)

func (*Register_Reply) XXX_Size

func (m *Register_Reply) XXX_Size() int

func (*Register_Reply) XXX_Unmarshal

func (m *Register_Reply) XXX_Unmarshal(b []byte) error

type Register_Request

type Register_Request struct {
	VerifiedCredential      []byte `protobuf:"bytes,1,opt,name=verified_credential,json=verifiedCredential,proto3" json:"verified_credential,omitempty"`
	ExpirationDate          int64  `protobuf:"varint,2,opt,name=expiration_date,json=expirationDate,proto3" json:"expiration_date,omitempty"`
	LockedUntilDate         int64  `protobuf:"varint,3,opt,name=locked_until_date,json=lockedUntilDate,proto3" json:"locked_until_date,omitempty"`
	AccountURI              string `protobuf:"bytes,4,opt,name=account_uri,json=accountUri,proto3" json:"account_uri,omitempty"`
	OverwriteExistingRecord bool   `` /* 133-byte string literal not displayed */
}

func (*Register_Request) Descriptor

func (*Register_Request) Descriptor() ([]byte, []int)

func (*Register_Request) GetAccountURI added in v2.452.0

func (m *Register_Request) GetAccountURI() string

func (*Register_Request) GetExpirationDate

func (m *Register_Request) GetExpirationDate() int64

func (*Register_Request) GetLockedUntilDate

func (m *Register_Request) GetLockedUntilDate() int64

func (*Register_Request) GetOverwriteExistingRecord

func (m *Register_Request) GetOverwriteExistingRecord() bool

func (*Register_Request) GetVerifiedCredential

func (m *Register_Request) GetVerifiedCredential() []byte

func (*Register_Request) ProtoMessage

func (*Register_Request) ProtoMessage()

func (*Register_Request) Reset

func (m *Register_Request) Reset()

func (*Register_Request) String

func (m *Register_Request) String() string

func (*Register_Request) XXX_DiscardUnknown

func (m *Register_Request) XXX_DiscardUnknown()

func (*Register_Request) XXX_Marshal

func (m *Register_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Register_Request) XXX_Merge

func (m *Register_Request) XXX_Merge(src proto.Message)

func (*Register_Request) XXX_Size

func (m *Register_Request) XXX_Size() int

func (*Register_Request) XXX_Unmarshal

func (m *Register_Request) XXX_Unmarshal(b []byte) error

type UnimplementedDirectoryServiceServer

type UnimplementedDirectoryServiceServer struct {
}

UnimplementedDirectoryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDirectoryServiceServer) Query

func (UnimplementedDirectoryServiceServer) Register

func (UnimplementedDirectoryServiceServer) Unregister

type Unregister

type Unregister struct {
}

func (*Unregister) Descriptor

func (*Unregister) Descriptor() ([]byte, []int)

func (*Unregister) ProtoMessage

func (*Unregister) ProtoMessage()

func (*Unregister) Reset

func (m *Unregister) Reset()

func (*Unregister) String

func (m *Unregister) String() string

func (*Unregister) XXX_DiscardUnknown

func (m *Unregister) XXX_DiscardUnknown()

func (*Unregister) XXX_Marshal

func (m *Unregister) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unregister) XXX_Merge

func (m *Unregister) XXX_Merge(src proto.Message)

func (*Unregister) XXX_Size

func (m *Unregister) XXX_Size() int

func (*Unregister) XXX_Unmarshal

func (m *Unregister) XXX_Unmarshal(b []byte) error

type Unregister_Reply

type Unregister_Reply struct {
}

func (*Unregister_Reply) Descriptor

func (*Unregister_Reply) Descriptor() ([]byte, []int)

func (*Unregister_Reply) ProtoMessage

func (*Unregister_Reply) ProtoMessage()

func (*Unregister_Reply) Reset

func (m *Unregister_Reply) Reset()

func (*Unregister_Reply) String

func (m *Unregister_Reply) String() string

func (*Unregister_Reply) XXX_DiscardUnknown

func (m *Unregister_Reply) XXX_DiscardUnknown()

func (*Unregister_Reply) XXX_Marshal

func (m *Unregister_Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unregister_Reply) XXX_Merge

func (m *Unregister_Reply) XXX_Merge(src proto.Message)

func (*Unregister_Reply) XXX_Size

func (m *Unregister_Reply) XXX_Size() int

func (*Unregister_Reply) XXX_Unmarshal

func (m *Unregister_Reply) XXX_Unmarshal(b []byte) error

type Unregister_Request

type Unregister_Request struct {
	DirectoryIdentifier  string `protobuf:"bytes,1,opt,name=directory_identifier,json=directoryIdentifier,proto3" json:"directory_identifier,omitempty"`
	DirectoryRecordToken string `protobuf:"bytes,2,opt,name=directory_record_token,json=directoryRecordToken,proto3" json:"directory_record_token,omitempty"`
	UnregisterToken      string `protobuf:"bytes,3,opt,name=unregister_token,json=unregisterToken,proto3" json:"unregister_token,omitempty"`
}

func (*Unregister_Request) Descriptor

func (*Unregister_Request) Descriptor() ([]byte, []int)

func (*Unregister_Request) GetDirectoryIdentifier

func (m *Unregister_Request) GetDirectoryIdentifier() string

func (*Unregister_Request) GetDirectoryRecordToken

func (m *Unregister_Request) GetDirectoryRecordToken() string

func (*Unregister_Request) GetUnregisterToken added in v2.452.0

func (m *Unregister_Request) GetUnregisterToken() string

func (*Unregister_Request) ProtoMessage

func (*Unregister_Request) ProtoMessage()

func (*Unregister_Request) Reset

func (m *Unregister_Request) Reset()

func (*Unregister_Request) String

func (m *Unregister_Request) String() string

func (*Unregister_Request) XXX_DiscardUnknown

func (m *Unregister_Request) XXX_DiscardUnknown()

func (*Unregister_Request) XXX_Marshal

func (m *Unregister_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unregister_Request) XXX_Merge

func (m *Unregister_Request) XXX_Merge(src proto.Message)

func (*Unregister_Request) XXX_Size

func (m *Unregister_Request) XXX_Size() int

func (*Unregister_Request) XXX_Unmarshal

func (m *Unregister_Request) XXX_Unmarshal(b []byte) error

type UnsafeDirectoryServiceServer added in v2.455.0

type UnsafeDirectoryServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDirectoryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DirectoryServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL