entity

package
v0.0.0-...-b9b4979 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACTIVE    = "active"
	COMPLETED = "completed"
	ARCHIVED  = "archived"
)

Task status enumeration

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color string

type Date

type Date string

type Email

type Email string

Email represents email.

type Item

type Item struct {
	Id           int    `json:"id"`
	Name         string `json:"name"`
	ImageSrc     string `json:"imageSrc"`
	ImageForHero string `json:"imageForHero"`
	Description  string `json:"description"`
	Price        int    `json:"price"`
	Category     string `json:"category"`
	Armor        int    `json:"armor"`
	Damage       int    `json:"damage"`
	Rarity       string `json:"rarity"`

	State ItemState `json:"state"`
}

Item represents single in-game item.

type ItemState

type ItemState State

ItemState represents item state.

const (
	// Equipped shows that user is using this item.
	Equipped ItemState = "equipped"
	// Inventoried shows that item is in inventory.
	Inventoried ItemState = "inventoried"
	// Store shows that item in a store
	Store ItemState = "store"
)

type Labels

type Labels string

type Name

type Name string

type Nickname

type Nickname string

Nickname represents user's nickname.

type Password

type Password string

Password represents password.

type State

type State string

State represents state.

type Status

type Status string

type Task

type Task struct {
	Id                   int64  `json:"id"`
	UserId               int64  `json:"userId"`
	Name                 Name   `json:"name"`
	Description          Text   `json:"description,omitempty"`
	CreatedOn            Date   `json:"createdOn"`
	DueDate              Date   `json:"dueDate"`
	SchtirlichHumorescue Text   `json:"schtirlichHumorescue,omitempty"`
	Labels               Labels `json:"labels"`
	Status               Status `json:"status"`
}

Task represents task at all layers

type Text

type Text string

type User

type User struct {
	Id       int64    `json:"id"`
	Email    Email    `json:"email"`
	Nickname Nickname `json:"nickname"`
	Password Password `json:"password"`
}

A User represents single API user.

Jump to

Keyboard shortcuts

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