Documentation
¶
Index ¶
- func IsErrBadRequest(err error) bool
- func IsErrConflict(err error) bool
- func IsErrNotFound(err error) bool
- func ParseStatusError(err error) (int, string)
- type ErrPetAdoptionNotFound
- type ErrPetNotFound
- type ErrShelterAlreadyExist
- type ErrShelterNotFound
- type ErrUserAlreadyExist
- type ErrUserNotAuthenticated
- type ErrUserNotFound
- type ErrUserPasswordMismatch
- type Pet
- type PetAdoption
- type PetAdoptionStatus
- type PetType
- type Shelter
- type StatusError
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrBadRequest ¶
func IsErrConflict ¶
func IsErrNotFound ¶
func ParseStatusError ¶ added in v0.0.2
Types ¶
type ErrPetAdoptionNotFound ¶ added in v0.0.2
type ErrPetAdoptionNotFound struct {
PetID string
}
func (ErrPetAdoptionNotFound) Error ¶ added in v0.0.2
func (err ErrPetAdoptionNotFound) Error() string
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"` Type PetType `json:"type"` Breed string `json:"breed"` Gender string `json:"gender"` Photo string `json:"photo"` AdoptionStatus PetAdoptionStatus `json:"adoptionStatus"` // ShelterID will always be set, even if any user adopts it // AdoptionStatus will be set to adopted, if anyone adopts it ShelterID string `json:"shelterID"` }
type PetAdoption ¶ added in v0.0.2
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.