server

package
v0.0.0-...-02a5af8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Name string `envconfig:"NAME" default:"account"`
	Host string `envconfig:"HOST" default:"0.0.0.0"`
	Port int    `envconfig:"PORT" default:"10010"`

	DBDriver string `envconfig:"DB_DRIVER" default:"mysql"`
	DBUrl    string `envconfig:"DB_URL" default:"root:sa@tcp(127.0.0.1:3306)/sandbox?parseTime=True"`

	PigeonStorageDriver string `envconfig:"PIGEON_STORAGE_DRIVER" default:"mysql"`
	PigeonStorageURL    string `envconfig:"PIGEON_STORAGE_URL" default:"root:sa@tcp(127.0.0.1:3306)/sandbox?parseTime=True"`
	PigeonBrokerURL     string `envconfig:"PIGEON_BROKER_URL" default:"nats://127.0.0.1:4222"`
	// contains filtered or unexported fields
}

func (*Server) Error

func (s *Server) Error() grpc.UnaryServerInterceptor

func (*Server) Logging

func (s *Server) Logging() grpc.UnaryServerInterceptor

func (*Server) Recovery

func (s *Server) Recovery() grpc.UnaryServerInterceptor

func (*Server) Serve

func (s *Server) Serve(ctx context.Context)

type Service

type Service struct {
	Store         *ent.Client
	EventSourcing *pigeon.Client
	Log           *log.Logger
}

func (*Service) ChangePassword

func (s *Service) ChangePassword(ctx context.Context, req *services.ChangePasswordRequest) (*resources.Empty, error)

func (*Service) CreateAccount

func (s *Service) CreateAccount(ctx context.Context, req *services.CreateAccountRequest) (*resources.Empty, error)

func (*Service) GetAccount

func (*Service) ListAccounts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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