greeter

package
v0.0.0-...-1105903 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Data

type Data struct {
}

Data .

func NewData

func NewData(c *conf.Data, logger log.Logger) (*Data, func(), error)

NewData .

type Greeter

type Greeter struct {
	Hello string
}

type GreeterRepo

type GreeterRepo interface {
	CreateGreeter(context.Context, *Greeter) error
	UpdateGreeter(context.Context, *Greeter) error
}

func NewGreeterRepo

func NewGreeterRepo(data *Data, logger log.Logger) GreeterRepo

NewGreeterRepo .

type GreeterService

type GreeterService struct {
	v1.UnimplementedGreeterServer
	// contains filtered or unexported fields
}

GreeterService is a greeter service.

func NewGreeterService

func NewGreeterService(uc *GreeterUsecase, logger log.Logger) *GreeterService

NewGreeterService new a greeter service.

func (*GreeterService) SayHello

func (s *GreeterService) SayHello(ctx context.Context, in *v1.HelloRequest) (*v1.HelloReply, error)

SayHello implements helloworld.GreeterServer

type GreeterUsecase

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

func NewGreeterUsecase

func NewGreeterUsecase(repo GreeterRepo, logger log.Logger) *GreeterUsecase

func (*GreeterUsecase) Create

func (uc *GreeterUsecase) Create(ctx context.Context, g *Greeter) error

func (*GreeterUsecase) Update

func (uc *GreeterUsecase) Update(ctx context.Context, g *Greeter) error

Jump to

Keyboard shortcuts

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