Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CookieLife = 168 * time.Hour
)
View Source
var (
ErrNotFound = driver.ErrNoDocuments
)
Functions ¶
This section is empty.
Types ¶
type ErrDuplicateKey ¶
type ErrDuplicateKey struct {
Internal error
}
func (*ErrDuplicateKey) Error ¶
func (e *ErrDuplicateKey) Error() string
type Game ¶
type Game struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"-"` // These could be from `levels` collection instead, but since we're using // hard-coded levels for this version, it's reasonable to put them here. Title string `bson:"title" json:"title,omitempty"` SuccessText []string `bson:"success_text" json:"success_text,omitempty"` FailureText []string `bson:"failure_text" json:"failure_text,omitempty"` Prompt string `bson:"prompt" json:"prompt,omitempty"` Width int32 `bson:"width" json:"width,omitempty"` Height int32 `bson:"height" json:"height,omitempty"` Map [][]MapTile `bson:"map" json:"map"` LevelID string `bson:"level" json:"-"` CreatedAt time.Time `bson:"created_at" json:"-"` UpdatedAt time.Time `bson:"updated_at" json:"-"` Status string `bson:"status" json:"status"` UserID string `bson:"user" json:"-"` }
type Photo ¶
type Photo struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"-"` Seq int32 `bson:"seq" json:"id"` Key string `bson:"key" json:"key"` Desc string `bson:"desc" json:"desc"` Original string `bson:"original" json:"original"` URLs map[string]string `bson:"urls" json:"urls,omitempty"` // ObjectId for user-uploaded, or some predefined value for system-generated UserID string `bson:"user" json:"-"` // Has all AI variants been generated? (initial_process_complete) InitComplete bool `bson:"init_complete" json:"available"` Progress int32 `bson:"init_progress" json:"progress"` // 0-100 from Replicate response Status string `bson:"init_status" json:"message"` // From Replicate response, e.g. "starting" }
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"-"` Name string `bson:"name" json:"name"` Nick string `bson:"nick" json:"nickname"` Avatar string `bson:"avatar" json:"avatar"` Stats UserStats `bson:"stats" json:"stats"` NextPicSeq int32 `bson:"next_pic_seq" json:"-"` Album []Photo `bson:"-" json:"album"` // Filled by querying the `photos` collection }
Click to show internal directories.
Click to hide internal directories.