list

package
v0.0.0-...-bfc3bc0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService() (server.Service, error)

NewService returns a new Service

Types

type Server

type Server struct {
	api.ListServiceServer
	*service.Server
}

Server is an implementation of ListServiceServer for the list primitive

func (*Server) Append

func (s *Server) Append(ctx context.Context, request *api.AppendRequest) (*api.AppendResponse, error)

Append adds a value to the end of the list

func (*Server) Clear

func (s *Server) Clear(ctx context.Context, request *api.ClearRequest) (*api.ClearResponse, error)

Clear removes all indexes from the list

func (*Server) Close

func (s *Server) Close(ctx context.Context, request *api.CloseRequest) (*api.CloseResponse, error)

Close closes a session

func (*Server) Contains

func (s *Server) Contains(ctx context.Context, request *api.ContainsRequest) (*api.ContainsResponse, error)

Contains checks whether the list contains a value

func (*Server) Create

func (s *Server) Create(ctx context.Context, request *api.CreateRequest) (*api.CreateResponse, error)

Create opens a new session

func (*Server) Events

func (s *Server) Events(request *api.EventRequest, srv api.ListService_EventsServer) error

Events listens for list change events

func (*Server) Get

func (s *Server) Get(ctx context.Context, request *api.GetRequest) (*api.GetResponse, error)

Get gets the value at a specific index

func (*Server) Insert

func (s *Server) Insert(ctx context.Context, request *api.InsertRequest) (*api.InsertResponse, error)

Insert inserts a value at a specific index

func (*Server) Iterate

func (s *Server) Iterate(request *api.IterateRequest, srv api.ListService_IterateServer) error

Iterate lists all the value in the list

func (*Server) Remove

func (s *Server) Remove(ctx context.Context, request *api.RemoveRequest) (*api.RemoveResponse, error)

Remove removes an index from the list

func (*Server) Set

func (s *Server) Set(ctx context.Context, request *api.SetRequest) (*api.SetResponse, error)

Set sets the value at a specific index

func (*Server) Size

func (s *Server) Size(ctx context.Context, request *api.SizeRequest) (*api.SizeResponse, error)

Size gets the number of elements in the list

type Service

type Service struct {
	server.Service
}

Service is an implementation of list api service.

func (Service) Register

func (s Service) Register(r *grpc.Server)

Register registers the list service

Jump to

Keyboard shortcuts

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