client

package
v0.0.0-...-a5b82e5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package client provides a fake client to a fictional "identity" service to use in testing.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates that the Record for the ID given could not be found.
	ErrNotFound = fmt.Errorf("ID not found")
)

Functions

This section is empty.

Types

type ID

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

ID is a client to our fake identity service.

func (*ID) Call

func (i *ID) Call(ctx context.Context, recs []Record) ([]Record, error)

type Record

type Record struct {
	// First is the first name of the person.
	First string
	// Last is the last name of the person.
	Last string
	// ID is the ID
	ID string

	// Birth is the time the person was born.
	Birth time.Time
	// BirthTown is what town the person was born in.
	BirthTown string
	// State is the state the person was born in.
	BirthState string

	// Err is a data error on this Record.
	Err error
}

Record holds records on a person. Before processing, we should have "First", "Last", and "ID" set.

Jump to

Keyboard shortcuts

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