greeting

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package greeting defines greeting domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clearer

type Clearer interface {
	ClearGreetings(ctx context.Context) (int, error)
}

Clearer removes all greetings and returns number of affected rows.

type Maker

type Maker interface {
	Hello(ctx context.Context, params Params) (string, error)
}

Maker makes a greeting.

type Params

type Params struct {
	Name   string `query:"name" default:"World"`
	Locale string `query:"locale" required:"true" enum:"en-US,ru-RU"`
}

Params describes greeting input.

type SimpleMaker

type SimpleMaker struct{}

SimpleMaker can greet you in two locales.

func (*SimpleMaker) GreetingMaker

func (s *SimpleMaker) GreetingMaker() Maker

GreetingMaker implements service provider.

func (*SimpleMaker) Hello

func (s *SimpleMaker) Hello(ctx context.Context, params Params) (string, error)

Hello greets.

Jump to

Keyboard shortcuts

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