Documentation ¶
Overview ¶
Package tranapp maintains the app layer api for the tran domain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App manages the set of app layer api functions for the tran domain.
type NewProduct ¶
type NewProduct struct { Name string `json:"name" validate:"required"` Cost float64 `json:"cost" validate:"required,gte=0"` Quantity int `json:"quantity" validate:"required,gte=1"` }
NewProduct is what we require from clients when adding a Product.
func (NewProduct) Validate ¶
func (app NewProduct) Validate() error
Validate checks the data in the model is considered clean.
type NewTran ¶
type NewTran struct { Product NewProduct `json:"product"` User NewUser `json:"user"` }
NewTran represents an example of cross domain transaction at the application layer.
type NewUser ¶
type NewUser struct { Name string `json:"name" validate:"required"` Email string `json:"email" validate:"required,email"` Roles []string `json:"roles" validate:"required"` Department string `json:"department"` Password string `json:"password" validate:"required"` PasswordConfirm string `json:"passwordConfirm" validate:"eqfield=Password"` }
NewUser contains information needed to create a new user.
Click to show internal directories.
Click to hide internal directories.