Documentation ¶
Overview ¶
Package homegrp maintains the group of handlers for home access.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidID = errors.New("ID is not in its proper form")
)
Set of error variables for handling home group errors.
Functions ¶
Types ¶
type AppAddress ¶
type AppAddress struct { Address1 string `json:"address1"` Address2 string `json:"address2"` ZipCode string `json:"zipCode"` City string `json:"city"` State string `json:"state"` Country string `json:"country"` }
AppAddress represents information about an individual address.
type AppHome ¶
type AppHome struct { ID string `json:"id"` UserID string `json:"userID"` Type string `json:"type"` Address AppAddress `json:"address"` DateCreated string `json:"dateCreated"` DateUpdated string `json:"dateUpdated"` }
AppHome represents information about an individual home.
type AppNewAddress ¶
type AppNewAddress struct { Address1 string `json:"address1" validate:"required,min=1,max=70"` Address2 string `json:"address2" validate:"omitempty,max=70"` ZipCode string `json:"zipCode" validate:"required,numeric"` City string `json:"city" validate:"required"` State string `json:"state" validate:"required,min=1,max=48"` Country string `json:"country" validate:"required,iso3166_1_alpha2"` }
AppNewAddress defines the data needed to add a new address.
type AppNewHome ¶
type AppNewHome struct { Type string `json:"type" validate:"required"` Address AppNewAddress `json:"address"` }
AppNewHome defines the data needed to add a new home.
func (AppNewHome) Validate ¶
func (app AppNewHome) Validate() error
Validate checks if the data in the model is considered clean.
type AppUpdateAddress ¶
type AppUpdateAddress struct { Address1 *string `json:"address1" validate:"omitempty,min=1,max=70"` Address2 *string `json:"address2" validate:"omitempty,max=70"` ZipCode *string `json:"zipCode" validate:"omitempty,numeric"` City *string `json:"city"` State *string `json:"state" validate:"omitempty,min=1,max=48"` Country *string `json:"country" validate:"omitempty,iso3166_1_alpha2"` }
AppUpdateAddress defines the data needed to update an address.
func (AppUpdateAddress) Validate ¶
func (app AppUpdateAddress) Validate() error
Validate checks the data in the model is considered clean.
type AppUpdateHome ¶
type AppUpdateHome struct { Type *string `json:"type"` Address *AppUpdateAddress `json:"address"` }
AppUpdateHome defines the data needed to update a home.
func (AppUpdateHome) Validate ¶
func (app AppUpdateHome) Validate() error
Validate checks the data in the model is considered clean.
Click to show internal directories.
Click to hide internal directories.