author

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToDB added in v0.0.4

func MapToDB(author Author) db.AuthorDB

func ToDBAuthor added in v0.0.2

func ToDBAuthor(author *Author) *db.AuthorDB

Types

type Author

type Author struct {
	Id        string
	Name      *string
	ColorId   string
	Token     *string
	Timestamp int64
}

func MapFromDB added in v0.0.4

func MapFromDB(authorDB db.AuthorDB) Author

func NewRandomAuthor added in v0.0.2

func NewRandomAuthor() *Author

type Manager

type Manager struct {
	Db db.DataStore
}

func NewManager

func NewManager(db db.DataStore) *Manager

func (*Manager) CreateAuthor

func (m *Manager) CreateAuthor(name *string) (*Author, error)

func (*Manager) GetAuthor

func (m *Manager) GetAuthor(authorId string) (*Author, error)

func (*Manager) GetAuthor4Token

func (m *Manager) GetAuthor4Token(token string) (*Author, error)

func (*Manager) GetAuthorId

func (m *Manager) GetAuthorId(token string) (*Author, error)

func (*Manager) GetAuthorName

func (m *Manager) GetAuthorName(authorId string) (*string, error)

*

  • Returns the name of the author
  • @param {String} author The id of the author

func (*Manager) GetAuthors added in v0.0.4

func (m *Manager) GetAuthors(authorIds []string) (*[]Author, error)

func (*Manager) GetPadsOfAuthor added in v0.0.4

func (m *Manager) GetPadsOfAuthor(authorId string) (*[]string, error)

func (*Manager) ListPadsOfAuthor

func (m *Manager) ListPadsOfAuthor(authorId string) ([]string, error)

*

  • Returns an array of all pads this author contributed to
  • @param {String} authorID The id of the author

func (*Manager) SetAuthorColor

func (m *Manager) SetAuthorColor(author string, colorId string) error

func (*Manager) SetAuthorName

func (m *Manager) SetAuthorName(authorId string, authorName string) error

Jump to

Keyboard shortcuts

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