Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateClientCommand ¶
type CreateClientCommand struct { //Name is the name of the Client to create. Name string }
CreateClientCommand is Command that should be used to create a new Client and add it to a repository.
type DeleteClientCommand ¶
DeleteClientCommand is a Command to delete (remove) a Client.
type Handler ¶
type Handler struct { //Clients is the Client repository to use within Command handling. Clients client.Repo }
Handler is a handler type that understands how to work with Client commands.
func (*Handler) CreateClient ¶
CreateClient attempts to create a new Client and add it to h.Clients. Cmd must be of type *CreateClientCommand. The result, if not nil and without error, will be a *client.Client.
func (*Handler) DeleteClient ¶
DeleteClient attempts to remove a Client from h.Clients. Cmd must be of type *DeleteClientCommand. The result will always be nil. A non-nil error will be returned to indicate failure.
type UpdateClientCommand ¶
type UpdateClientCommand struct { //Id is the Id of the Client to update. Id data.Id //Name, if not nil, is the name to set on the Client. Name *string }
UpdateClientCommand is a Command to update a Client.