Documentation ¶
Index ¶
- Variables
- func NewClient() (*mongo.Client, *context.Context, context.CancelFunc, error)
- func SeedDB()
- type Account
- type AccountsList
- type Book
- type BookImageLink
- type BookTranslation
- type BooksList
- type Constants
- type Server
- func (s *Server) GetAccount(c echo.Context) error
- func (s *Server) GetBook(c echo.Context) error
- func (s *Server) GetUser(c echo.Context) error
- func (s *Server) ListAccounts(c echo.Context) error
- func (s *Server) ListBooks(c echo.Context) error
- func (s *Server) ListBooksInLocale(c echo.Context) error
- func (s *Server) ListUsers(c echo.Context) error
- type SubAccount
- type User
- type UsersList
Constants ¶
This section is empty.
Variables ¶
View Source
var ABeautifulDayFrenchID = "ec1e5bcb-5f88-4c8c-85e1-9e0b09f75b7b"
View Source
var ABeautifulDayFrenchTitle = "Une belle journée"
View Source
var ABeautifulDayID = "15752fd0-81bf-4acd-a35d-80b95f07cd59"
View Source
var DefaultAccountId = "2e771804-3900-44eb-89f7-28a8801f381c"
View Source
var DefaultDisplayName = "Test User"
View Source
var DefaultSubAccount1DisplayName = "Test User - Sub Account 1"
View Source
var DefaultSubAccount1Id = "a6084b06-487a-413c-91f2-58bc4057831f"
View Source
var DefaultSubAccount2DisplayName = "Test User - Sub Account 2"
View Source
var DefaultSubAccount2Id = "bc97b04a-7d56-46ab-b203-188cf74b47b2"
View Source
var DefaultSubAccount3DisplayName = "Test User - Sub Account 3"
View Source
var DefaultSubAccount3Id = "a49f87fd-9a28-44b0-8953-07c2063dbe0a"
View Source
var DefaultUserEmail = "test@email.com"
View Source
var DefaultUserId = "c5177e5e-1f54-48f6-aba8-9a816b1d7599"
Functions ¶
Types ¶
type Account ¶
type Account struct { ID string `json:"id" bson:"id"` UserID string `json:"userId" bson:"userId"` SubAccounts []*SubAccount `json:"subAccounts" bson:"subAccounts"` }
type AccountsList ¶
type AccountsList struct {
Items []*Account `json:"items"`
}
func GetStaticAccountsList ¶
func GetStaticAccountsList() *AccountsList
func (*AccountsList) GetAccountById ¶
func (aL *AccountsList) GetAccountById(id string) (*Account, error)
type Book ¶
type Book struct { ID string `json:"id" bson:"id"` Translations []*BookTranslation `json:"translations" bson:"translations"` }
type BookImageLink ¶
type BookTranslation ¶
type BookTranslation struct { ID string `json:"id" bson:"id"` Locale string `json:"locale" bson:"locale"` Title string `json:"title" bson:"title"` Content []*BookImageLink `json:"content" bson:"content"` }
type BooksList ¶
type BooksList struct {
Items []*Book `json:"items"`
}
func GetStaticBooksList ¶
func GetStaticBooksList() *BooksList
func (*BooksList) GetBooksWithLocale ¶
type Server ¶
type Server struct { EchoServer *echo.Echo Constants Constants MongoClient *mongo.Client MongoContext *context.Context MongoContextCancel context.CancelFunc }
func (*Server) GetAccount ¶
func (*Server) ListAccounts ¶
func (*Server) ListBooksInLocale ¶
type SubAccount ¶
Click to show internal directories.
Click to hide internal directories.