contract

package
v0.5.2-0...-162e27b Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID       int64
	Name     string
	Metadata map[string]string
}

type Book

type Book struct {
	ID      BookID
	Name    string
	Authors []Author
}

type BookID

type BookID int64

type Library

type Library interface {
	GetBooks(ctx context.Context) ([]Book, string, error)
	BorrowBook(ctx context.Context, BookID int64) error
	GetBookAuthor(ctx context.Context, BookID int64) (Author, map[string]string, regexp.Regexp, error)
}

Jump to

Keyboard shortcuts

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