helloworld

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallRequest

type CallRequest struct {
	// name to append to the message e.g Alice
	Name string `json:"name,omitempty"`
}

type CallResponse

type CallResponse struct {
	// message including name e.g Hello Alice
	Message string `json:"message,omitempty"`
}

type Helloworld added in v0.6.0

type Helloworld interface {
	Call(*CallRequest) (*CallResponse, error)
	Stream(*StreamRequest) (*StreamResponseStream, error)
}

type HelloworldService

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

func NewHelloworldService

func NewHelloworldService(token string) *HelloworldService

func (*HelloworldService) Call

func (t *HelloworldService) Call(request *CallRequest) (*CallResponse, error)

Return a personalised Hello message

func (*HelloworldService) Stream

Stream a personalised Hello message

type StreamRequest

type StreamRequest struct {
	// the number of messages to send back
	Messages int64 `json:"messages,string,omitempty"`
	// name to append to the message e.g Alice
	Name string `json:"name,omitempty"`
}

type StreamResponse

type StreamResponse struct {
	// message including name e.g Hello Alice
	Message string `json:"message,omitempty"`
}

type StreamResponseStream added in v0.2.0

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

func (*StreamResponseStream) Recv added in v0.2.0

Jump to

Keyboard shortcuts

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