explainer

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

One or two sentence synopsis of the package...

Overview

One or two paragraph overview of the package... (This page describes the nature of the individual package.)

More information at https://github.com/senzing-garage/explain

Another Header

Details of the package... Lorem ipsum dolor sit amet, consectetur adipiscing elit...

Examples

The examples given here should be specific to the package.

Examples of use can be seen in the examplepackage_test.go files.

package main
import (
	fmt

	"github.com/senzing-garage/explain/examplepackage"
)

func main() {
	ctx := context.TODO()
	testObject := &ExamplePackageImpl{
		Something: "I'm here",
	}
	err := testObject.SaySomething(ctx)
	if err != nil {
		fmt.Println("whoops")
	}
}

Index

Examples

Constants

This section is empty.

Variables

View Source
var ComponentID2WebPage = map[int]string{
	6001: page("sz-sdk-go-core"),
	6002: page("sz-sdk-go-core"),
	6003: page("sz-sdk-go-core"),
	6004: page("sz-sdk-go-core"),
	6005: page("sz-sdk-go-core"),
	6006: page("sz-sdk-go-core"),
	6007: page("sz-sdk-go-core"),
	6008: page("sz-sdk-go-core"),
	6009: page("sz-sdk-go-core"),
	6011: page("serve-grpc"),
	6012: page("serve-grpc"),
	6013: page("serve-grpc"),
	6014: page("serve-grpc"),
	6015: page("serve-grpc"),
	6016: page("serve-grpc"),
	6017: page("serve-grpc"),
	6021: page("sz-sdk-go-grpc"),
	6022: page("sz-sdk-go-grpc"),
	6023: page("sz-sdk-go-grpc"),
	6024: page("sz-sdk-go-grpc"),
	6025: page("sz-sdk-go-grpc"),
	6026: page("sz-sdk-go-grpc"),
	6027: page("sz-sdk-go-grpc"),
	6031: page("sz-sdk-go-mock"),
	6032: page("sz-sdk-go-mock"),
	6033: page("sz-sdk-go-mock"),
	6034: page("sz-sdk-go-mock"),
	6035: page("sz-sdk-go-mock"),
	6036: page("sz-sdk-go-mock"),
	6037: page("sz-sdk-go-mock"),
	6038: page("sz-sdk-go-mock"),
	6039: page("sz-sdk-go-mock"),
	6041: page("go-sdk-abstract-factory"),
	6100: page("senzing-tools"),
	6201: page("load"),
	6202: page("move"),
	6203: page("validate"),
	6204: page("serve-grpc"),
	6205: page("init-database"),
	6206: page("shuffle"),
	6207: page("observe"),
	6401: page("go-helpers"),
	6402: page("go-helpers"),
	6403: page("go-helpers"),
	6404: page("go-helpers"),
	6421: page("go-databasing"),
	6422: page("go-databasing"),
	6423: page("go-databasing"),
	6441: page("go-logging"),
	6461: page("go-observing"),
	6462: page("go-observing"),
	6463: page("go-observing"),
	6464: page("go-observing"),
	6481: page("go-queuing"),
	6501: page("init-database"),
	6502: page("init-database"),
	6503: page("init-database"),
	6601: page("load"),
	6602: page("move"),
	6620: page("serve-chat"),
}

Functions

func ParseMessage added in v0.2.2

func ParseMessage(message string) (int, int, error)

Types

type Explainer

type Explainer interface {
	Explain(ctx context.Context) error
}

The Explainer interface is used as a "Command Pattern". See https://en.wikipedia.org/wiki/Command_pattern

type MessageExplainer added in v0.2.2

type MessageExplainer struct {
	MessageID string
	TtyOnly   bool
}

MessageExplainer is a Explainer for messages.

func (*MessageExplainer) Explain added in v0.2.2

func (explainer *MessageExplainer) Explain(ctx context.Context) error

The Explain method...

Input

  • ctx: A context to control lifecycle.

Output

  • Nothing is returned, except for an error. However, something is printed. See the example output.
Example
// For more information, visit https://github.com/senzing-garage/explain/blob/main/explainer/explainer_message_test.go
ctx := context.TODO()
explainer := &MessageExplainer{
	MessageID: "SZSDK60010000",
	TtyOnly:   true,
}
err := explainer.Explain(ctx)
if err != nil {
	panic(err)
}
Output:
For information on that message, visit https://senzing-garage.github.io/sz-sdk-go-core/errors#SZSDK60010000

type NullExplainer added in v0.2.2

type NullExplainer struct {
}

NullExplainer is a "null object" Explainer.

Example
// For more information, visit https://github.com/senzing-garage/explain/blob/main/explainer/explainer_message_test.go
ctx := context.TODO()
explainer := &NullExplainer{}
err := explainer.Explain(ctx)
if err != nil {
	panic(err)
}

func (*NullExplainer) Explain added in v0.2.2

func (explainer *NullExplainer) Explain(ctx context.Context) error

The Explain method simply returns a nil to drive the "Usage" output by the caller.

Input

  • ctx: A context to control lifecycle.

Jump to

Keyboard shortcuts

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