dbmodel

package
v0.0.0-...-18a9005 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2023 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	ID            idx.BookID `dynamodbav:"id" json:"id"`
	InternalTitle string     `dynamodbav:"internal_title" json:"internal_title"`
	Authors       string     `dynamodbav:"authors" json:"authors"`
}

type BookDiversityTags

type BookDiversityTags struct {
	BookID                           idx.BookID                  `dynamodbav:"book_id"`
	DiversityAndInclusionCatalogueID idx.DiversityAndInclusionID `dynamodbav:"dei_id"`
}

type ChildProfile

type ChildProfile struct {
	ID       idx.ChildProfileID `dynamodbav:"id" json:"id"`
	UserID   idx.UserID         `dynamodbav:"user_id" json:"user_id"`
	Nickname string             `dynamodbav:"nickname" json:"nickname"`
}

type DiversityAndInclusionCatalogue

type DiversityAndInclusionCatalogue struct {
	ID          idx.DiversityAndInclusionID `dynamodbav:"id"`
	Key         string                      `dynamodbav:"key"`
	Value       string                      `dynamodbav:"value"`
	Description string                      `dynamodbav:"description"`
}

type DynamoPage

type DynamoPage struct {
	ID            idx.PageID        `dynamodbav:"id"`
	ImageURL      string            `dynamodbav:"image_url"`
	Number        string            `dynamodbav:"page_number"`
	TranslationID idx.TranslationID `dynamodbav:"translation_id"`
}

func (DynamoPage) ToPage

func (p DynamoPage) ToPage() Page

type Language

type Language string
const (
	LanguageFrench  Language = "French"
	LanguageEnglish Language = "English"
	LanguageGerman  Language = "German"
)

func (Language) Validate

func (l Language) Validate() error

type Page

type Page struct {
	ID            idx.PageID        `dynamodbav:"id"`
	ImageURL      string            `dynamodbav:"image_url"`
	Number        int               `dynamodbav:"page_number" json:"page_number,string"`
	TranslationID idx.TranslationID `dynamodbav:"translation_id"`
}

type Session

type Session struct {
	Key              idx.SessionID `dynamodbav:"key"`
	CurrentProfileID string        `dynamodbav:"current_child_profile_id"`
	UserID           string        `dynamodbav:"user_id"`
	EmailAddress     string        `dynamodbav:"email_address"`
	ExpiresAtUnix    int64         `dynamodbav:"expires_at"`
}

type Translation

type Translation struct {
	ID             idx.TranslationID `dynamodbav:"id" json:"id"`
	BookID         idx.BookID        `dynamodbav:"book_id" json:"book_id"`
	LocalisedTitle string            `dynamodbav:"localised_title" json:"localised_title"`
	Language       Language          `dynamodbav:"lang" json:"language"`
}

type User

type User struct {
	ID           idx.UserID `dynamodb:"id" json:"id"`
	EmailAddress string     `dynamodbav:"email_address"`
	PasswordHash string     `dynamodbav:"password_hash"`
	InviteCode   string     `dynamodbav:"invite_code"`
	Confirmed    bool       `dynamodb:"confirmed"`
}

func (User) AsMap

func (u User) AsMap() map[string]any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL