models

package
v0.0.0-...-1700b71 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID       string
	Category string `boltholdIndex:"Category" json:"category"`
	Title    string `json:"title"`
	Short    string `json:"short"`
	Article  string `json:"article,omitempty"`

	LastModified time.Time `json:"last_modified"`
	Tags         []string  `json:"tags,omitempty"`
	Public       bool      `json:"public"`

	// for search result highlighting
	Fragments search.FieldFragmentMap `json:"fragments,omitempty"`
	Authors   []UserInfo              `json:"authors"`
}

type ArticleHistoryEntry

type ArticleHistoryEntry struct {
	Timestamp  time.Time
	ModifiedBy string
	ArticleID  string `boltholdIndex:"Article" json:"-"`
}

type Category

type Category struct {
	ID           string
	Category     string    `boltholdIndex:"Category" json:"category"`
	Image        string    `json:"image"`
	Title        string    `json:"title"`
	Description  string    `json:"description"`
	LastModified time.Time `json:"last_modified"`
	Public       bool      `json:"public"`

	// for search result highlighting
	Fragments search.FieldFragmentMap `json:"fragments,omitempty" msg:"-"`
}

type User

type User struct {
	IsAdmin  bool   `json:"is_admin,omitempty"`
	Password string `json:"password,omitempty"`
	UserInfo `msgpack:",inline"`
}

type UserInfo

type UserInfo struct {
	Username  string `json:"username"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Image     string `json:"image,omitempty"`
}

Jump to

Keyboard shortcuts

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