examples

package
v0.0.0-...-f38c46e Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package examples service examples @title Examples @description Example service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Component

func Component[C services.Component](ctx context.Context, name string) (component C, has bool)

func Service

func Service() (v services.Service)

Types

type HelloParam

type HelloParam struct {
	// World
	// @title Name
	// @description Name
	// @validate-message-i18n >>>
	// zh: 世界是必须的
	// en: world is required
	// <<<
	World string `json:"world" validate:"required" validate-message:"world_required"`
}

HelloParam @title Hello function argument @description Hello function argument

func (*HelloParam) CacheKey

func (param *HelloParam) CacheKey(ctx context.Context) (key []byte, err error)

type HelloResults

type HelloResults []string

HelloResults @title Hello Results @description Hello Results

func Hello

func Hello(ctx context.Context, param HelloParam) (result HelloResults, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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