server

package
v0.0.0-...-6be14c3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend implements the protobuf interface

func New

func New() *Backend

New initializes a new Backend struct.

func (*Backend) AddUser

func (b *Backend) AddUser(ctx context.Context, req *pbExample.AddUserRequest) (*pbExample.User, error)

AddUser adds a user to the in-memory store.

func (*Backend) GetUser

func (b *Backend) GetUser(ctx context.Context, req *pbExample.GetUserRequest) (*pbExample.User, error)

GetUser gets a user from the store.

func (*Backend) ListUsers

ListUsers lists all users in the store.

Jump to

Keyboard shortcuts

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