Documentation
¶
Index ¶
- func IsErrBadRequest(err error) bool
- func IsErrConflict(err error) bool
- func IsErrNotFound(err error) bool
- type ErrPetNotFound
- type ErrShelterAlreadyExist
- type ErrShelterNotFound
- type ErrUserAlreadyExist
- type ErrUserNotAuthenticated
- type ErrUserNotFound
- type ErrUserPasswordMismatch
- type Pet
- type PetAdoptionStatus
- type Shelter
- type StatusError
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrBadRequest ¶
func IsErrConflict ¶
func IsErrNotFound ¶
Types ¶
type ErrPetNotFound ¶
func (ErrPetNotFound) Error ¶
func (err ErrPetNotFound) Error() string
type ErrShelterAlreadyExist ¶
func (ErrShelterAlreadyExist) Error ¶
func (err ErrShelterAlreadyExist) Error() string
type ErrShelterNotFound ¶
func (ErrShelterNotFound) Error ¶
func (err ErrShelterNotFound) Error() string
type ErrUserAlreadyExist ¶
func (ErrUserAlreadyExist) Error ¶
func (err ErrUserAlreadyExist) Error() string
type ErrUserNotAuthenticated ¶
type ErrUserNotAuthenticated struct{}
func (ErrUserNotAuthenticated) Error ¶
func (err ErrUserNotAuthenticated) Error() string
type ErrUserNotFound ¶
func (ErrUserNotFound) Error ¶
func (err ErrUserNotFound) Error() string
type ErrUserPasswordMismatch ¶
type ErrUserPasswordMismatch struct{}
func (ErrUserPasswordMismatch) Error ¶
func (ErrUserPasswordMismatch) Error() string
type Pet ¶
type Pet struct { XKey string `json:"_key"` ID string `json:"id"` Name string `json:"name"` Breed string `json:"breed"` Gender string `json:"gender"` Photo string `json:"photo"` AdoptionStatus PetAdoptionStatus `json:"adoptionStatus"` ShelterID string `json:"shelterID""` OriginShelterID string `json:"originShelterID"` // If CurrentOwnerID is set, user is the current owner, // but it previously belonged to the shelter with the ShelterID CurrentOwnerID string `json:"currentOwnerID"` }
type PetAdoptionStatus ¶
type PetAdoptionStatus int
const ( PetAvailable PetAdoptionStatus = iota PetAdopted )
func (PetAdoptionStatus) String ¶
func (s PetAdoptionStatus) String() string
type Shelter ¶
type Shelter struct { XKey string `json:"_key"` ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Website string `json:"website"` Location string `json:"location"` ContactInformation string `json:"contactInformation"` Logo string `json:"logo"` NumberOfPets int64 `json:"numberOfPets"` // Assuming a shelter can have only one owner OwnerID string `json:"ownerID"` }
type StatusError ¶
func (StatusError) Error ¶
func (err StatusError) Error() string
type User ¶
type User struct { XKey string `json:"_key"` ID string `json:"id"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Bio string `json:"bio"` Location string `json:"location"` Avatar string `json:"avatar"` Username string `json:"username"` Email string `json:"email"` PasswordHash string `json:"passwordHash"` IsActive bool `json:"isActive"` IsAdmin bool `json:"isAdmin"` CreatedUnix int64 `json:"createdUnix"` UpdatedUnix int64 `json:"updatedUnix"` LastLoginUnix int64 `json:"lastLoginUnix"` }
Click to show internal directories.
Click to hide internal directories.