Documentation ¶
Index ¶
- Variables
- type Address
- type Card
- type CatalogueService
- type CountTagsResponse
- type CreateResponse
- type Health
- type HealthChecker
- type HealthCheckerFunc
- type HealthResponse
- type Href
- type Links
- type ListSockParams
- type ListSockResponse
- type Server
- type Sock
- type TagsResponse
- type User
- type UserAdressesResponse
- type UserCardsResponse
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("user not found") )
Functions ¶
This section is empty.
Types ¶
type Card ¶
type CatalogueService ¶
type CatalogueService interface {
ListSocks(ctx context.Context, req *ListSockParams) (*ListSockResponse, error)
}
type CountTagsResponse ¶
type CountTagsResponse struct {
Size int `json:"size"`
}
type CreateResponse ¶
type Health ¶
type Health struct { Service string `json:"service"` Status string `json:"status"` Time string `json:"time"` Details any `json:"details,omitempty"` }
Health describes the health of a service
type HealthChecker ¶
type HealthCheckerFunc ¶
func (HealthCheckerFunc) CheckHealth ¶
func (h HealthCheckerFunc) CheckHealth(ctx context.Context) ([]Health, error)
type HealthResponse ¶
type HealthResponse struct {
Healths []Health `json:"healths"`
}
type ListSockParams ¶
type ListSockResponse ¶
type ListSockResponse struct {
Socks []Sock `json:"sock"`
}
type Server ¶
type TagsResponse ¶
type TagsResponse struct {
Tags []string `json:"tags"`
}
type UserAdressesResponse ¶
type UserAdressesResponse struct {
Addresses []Address `json:"addresses"`
}
type UserCardsResponse ¶
type UserCardsResponse struct {
Cards []Card `json:"cards"`
}
type UserService ¶
type UserService interface { Login(ctx context.Context, username, password string) (*User, error) Register(ctx context.Context, user User) (uuid.UUID, error) GetUser(ctx context.Context, id string) (*User, error) GetCard(ctx context.Context, id string) (*Card, error) GetUserCards(ctx context.Context, userID string) ([]Card, error) GetUserAddresses(ctx context.Context, userID string) ([]Address, error) GetAddresses(ctx context.Context, id string) (*Address, error) CreateCard(ctx context.Context, card Card, userID string) (uuid.UUID, error) CreateAddress(ctx context.Context, addr Address, userID string) (uuid.UUID, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.