greeting

package
v0.0.0-...-878fcc9 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 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 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