server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyExists = fmt.Errorf("key already exists")
View Source
var ErrNotAuthorized = fmt.Errorf("not authorized")
View Source
var ErrNotFound = fmt.Errorf("not found")

Functions

func Int64ToBytes

func Int64ToBytes(i int64) []byte

Types

type DumpServer

type DumpServer struct {
	pb.UnimplementedDMSDumpServiceServer
	// contains filtered or unexported fields
}

func NewDumpServer

func NewDumpServer(baseDir string, lookupClient pb.LookupServiceClient, maxMessageAgeHours int) (*DumpServer, error)

func (*DumpServer) Receive

func (s *DumpServer) Receive(ctx context.Context, req *pb.ReceiveRequest) (*pb.ReceiveResponse, error)

func (*DumpServer) Send

func (s *DumpServer) Send(ctx context.Context, req *pb.SendRequest) (*pb.SendResponse, error)

type Server

type Server struct {
	pb.UnimplementedIdentityServiceServer
	pb.UnimplementedLookupServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(d *badger.DB) *Server

func (*Server) DisableKey

func (s *Server) DisableKey(ctx context.Context, req *pb.SignedWithPow) (*pb.KeyDisableResponse, error)

func (*Server) LookupAddress

func (s *Server) LookupAddress(ctx context.Context, req *pb.LookupAddressRequest) (*pb.LookupAddressResponse, error)

func (*Server) LookupKey

func (s *Server) LookupKey(ctx context.Context, req *pb.LookupKeyRequest) (*pb.LookupKeyResponse, error)

func (*Server) LookupName

func (s *Server) LookupName(ctx context.Context, req *pb.LookupNameRequest) (*pb.LookupNameResponse, error)

func (*Server) RegisterAddress

func (s *Server) RegisterAddress(ctx context.Context, req *pb.SignedWithPow) (*pb.AddressRegistrationResponse, error)

func (*Server) RegisterKey

func (s *Server) RegisterKey(ctx context.Context, req *pb.SignedWithPow) (*pb.KeyRegistrationResponse, error)

func (*Server) RegisterKeyRelationship

func (s *Server) RegisterKeyRelationship(ctx context.Context, req *pb.SignedWithPow) (*pb.KeyRelationshipRegistrationResponse, error)

func (*Server) RegisterName

func (s *Server) RegisterName(ctx context.Context, req *pb.SignedWithPow) (*pb.NameRegistrationResponse, error)

Jump to

Keyboard shortcuts

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