cmd

package
v0.0.0-...-637a51d Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer() error

RunServer runs gRPC server and HTTP gateway

Types

type Client

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

func (*Client) ConnectGRPCServer

func (client *Client) ConnectGRPCServer(address string)

func (*Client) DisconnectGRPCServer

func (client *Client) DisconnectGRPCServer()

func (*Client) RunClientService

func (client *Client) RunClientService(cfg HttpServerConfig)

type ClientConnector

type ClientConnector interface {
	RunClientService(cfg HttpServerConfig)
	ConnectGRPCServer(address string)
}

func NewClient

func NewClient() ClientConnector

type Config

type Config struct {
	// gRPC server start parameters section
	// gRPC is TCP port to listen by gRPC server
	GRPCPort string

	// DB Datastore parameters section
	// DatastoreDBHost is host of database
	DatastoreDBHost string
	// DatastoreDBUser is username to connect to database
	DatastoreDBUser string
	// DatastoreDBPassword password to connect to database
	DatastoreDBPassword string
	// DatastoreDBSchema is schema of database
	DatastoreDBSchema string
}

Config is configuration for Server

type HttpServerConfig

type HttpServerConfig struct {
	Port int
}

type ToDo

type ToDo struct {
	Id          int64
	Title       string
	Description string
	Reminder    time.Time
}

Jump to

Keyboard shortcuts

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