Documentation
¶
Index ¶
- func MapToDB(author Author) db.AuthorDB
- func ToDBAuthor(author *Author) *db.AuthorDB
- type Author
- type Manager
- func (m *Manager) CreateAuthor(name *string) (*Author, error)
- func (m *Manager) GetAuthor(authorId string) (*Author, error)
- func (m *Manager) GetAuthor4Token(token string) (*Author, error)
- func (m *Manager) GetAuthorId(token string) (*Author, error)
- func (m *Manager) GetAuthorName(authorId string) (*string, error)
- func (m *Manager) GetAuthors(authorIds []string) (*[]Author, error)
- func (m *Manager) GetPadsOfAuthor(authorId string) (*[]string, error)
- func (m *Manager) ListPadsOfAuthor(authorId string) ([]string, error)
- func (m *Manager) SetAuthorColor(author string, colorId string) error
- func (m *Manager) SetAuthorName(authorId string, authorName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDBAuthor ¶ added in v0.0.2
Types ¶
type Author ¶
type Author struct {
Id string `json:"id" example:"a.s8oes9dhwrvt0zif"`
Name *string `json:"name" example:"John Doe"`
ColorId string `json:"colorId" example:"#ff0000"`
Token *string `json:"token,omitempty"`
Timestamp int64 `json:"timestamp" example:"1704067200000"`
}
Author represents an Etherpad author @Description An author who can collaborate on pads
func NewRandomAuthor ¶ added in v0.0.2
func NewRandomAuthor() *Author
type Manager ¶
func NewManager ¶
func (*Manager) GetAuthorName ¶
*
- Returns the name of the author
- @param {String} author The id of the author
func (*Manager) GetAuthors ¶ added in v0.0.4
func (*Manager) GetPadsOfAuthor ¶ added in v0.0.4
func (*Manager) ListPadsOfAuthor ¶
*
- Returns an array of all pads this author contributed to
- @param {String} authorID The id of the author
func (*Manager) SetAuthorColor ¶
Click to show internal directories.
Click to hide internal directories.