client

package
v0.0.0-...-864a334 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package client implements gRPC client for working with GoK storage API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GokClient

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

func New

func New(logger *zap.Logger, authAddr, storageAddr string) *GokClient

func (*GokClient) Init

func (c *GokClient) Init(ctx context.Context, token string) (*entity.Branch, error)

func (*GokClient) Login

func (c *GokClient) Login(ctx context.Context, usr *entity.User) (*entity.SignedUser, error)

func (*GokClient) Pull

func (c *GokClient) Pull(ctx context.Context, token string, brn *entity.Branch) (*entity.Branch, []*entity.Record, error)

func (*GokClient) Push

func (c *GokClient) Push(ctx context.Context, token string, brn *entity.Branch, recs []*entity.Record) (*entity.Branch, error)

func (*GokClient) SignIn

func (c *GokClient) SignIn(ctx context.Context, usr *entity.User) (*entity.SignedUser, error)

Jump to

Keyboard shortcuts

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