example

package
v0.0.0-...-3c3b521 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: MIT, MIT Imports: 18 Imported by: 0

Documentation

Overview

generated by genkit -- DO NOT EDIT

generated by genkit -- DO NOT EDIT

generated by genkit -- DO NOT EDIT

generated by genkit -- DO NOT EDIT

generated by genkit -- DO NOT EDIT

Index

Constants

This section is empty.

Variables

View Source
var ErrExists = errors.New("User Exists")

ErrExists is returned when the user already exists

View Source
var ErrNotFound = errors.New("User Not Found")

Functions

func GetMux

func GetMux(ctx context.Context) *http.ServeMux

Types

type ServiceMiddleware

type ServiceMiddleware func(UserService) UserService

ServiceMiddleware is a chainable behavior modifier for UserService.

type User

type User struct {
	ID                  int64
	Name                string
	Website             string
	PrimaryContact      string
	PrimaryContactEmail string
	PrimaryContactPhone string
	CreatedAt           time.Time
}

@service

func (User) String

func (t User) String() string

type UserService

type UserService interface {
	Create(User) (string, error)
	Get(string) (User, error)
	Update(User) error
	List() ([]User, error)
	Delete(string) error
}

UserService represents operations on a User

Jump to

Keyboard shortcuts

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