Documentation
¶
Index ¶
- type AuthorMethods
- type ChatMethods
- type DataStore
- type GroupMethods
- type MemoryDataStore
- func (m *MemoryDataStore) CreatePad(padID string, padDB db.PadDB) bool
- func (m *MemoryDataStore) CreatePad2ReadOnly(padId string, readonlyId string)
- func (m *MemoryDataStore) CreateReadOnly2Pad(padId string, readonlyId string)
- func (m *MemoryDataStore) DoesPadExist(padID string) bool
- func (m *MemoryDataStore) GetAuthor(author string) (*db.AuthorDB, error)
- func (m *MemoryDataStore) GetAuthorByToken(token string) (*string, error)
- func (m *MemoryDataStore) GetGroup(groupId string) (*string, error)
- func (m *MemoryDataStore) GetPad(padID string) (*db.PadDB, error)
- func (m *MemoryDataStore) GetPadIds() []string
- func (m *MemoryDataStore) GetPadMetaData(padId string, revNum int) (*db.PadMetaData, error)
- func (m *MemoryDataStore) GetReadOnly2Pad(id string) *string
- func (m *MemoryDataStore) GetReadonlyPad(padId string) (*string, error)
- func (m *MemoryDataStore) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
- func (m *MemoryDataStore) GetSessionById(sessionID string) *session2.Session
- func (m *MemoryDataStore) RemoveChat(padId string) error
- func (m *MemoryDataStore) RemovePad(padID string) error
- func (m *MemoryDataStore) RemovePad2ReadOnly(id string) error
- func (m *MemoryDataStore) RemoveReadOnly2Pad(id string) error
- func (m *MemoryDataStore) RemoveRevisionsOfPad(padId string) error
- func (m *MemoryDataStore) RemoveSessionById(sessionID string) *session2.Session
- func (m *MemoryDataStore) SaveAuthor(author db.AuthorDB)
- func (m *MemoryDataStore) SaveAuthorColor(authorId string, authorColor int)
- func (m *MemoryDataStore) SaveAuthorName(authorId string, authorName string)
- func (m *MemoryDataStore) SaveRevision(padId string, rev int, changeset string, text apool.AText, pool apool.APool, ...) error
- func (m *MemoryDataStore) SetAuthorByToken(token string, author string) error
- func (m *MemoryDataStore) SetSessionById(sessionID string, session session2.Session)
- type PadMetaData
- type PadMethods
- type SQLiteDB
- func (d SQLiteDB) CreatePad(padID string, padDB db.PadDB) bool
- func (d SQLiteDB) CreatePad2ReadOnly(padId string, readonlyId string)
- func (d SQLiteDB) CreateReadOnly2Pad(padId string, readonlyId string)
- func (d SQLiteDB) DoesPadExist(padID string) bool
- func (d SQLiteDB) GetAuthor(author string) (*db.AuthorDB, error)
- func (d SQLiteDB) GetAuthorByToken(token string) (*string, error)
- func (d SQLiteDB) GetGroup(groupId string) (*string, error)
- func (d SQLiteDB) GetPad(padID string) (*db.PadDB, error)
- func (d SQLiteDB) GetPadIds() []string
- func (d SQLiteDB) GetPadMetaData(padId string, revNum int) (*db.PadMetaData, error)
- func (d SQLiteDB) GetReadOnly2Pad(id string) *string
- func (d SQLiteDB) GetReadonlyPad(padId string) (*string, error)
- func (d SQLiteDB) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
- func (d SQLiteDB) GetSessionById(sessionID string) *session2.Session
- func (d SQLiteDB) RemoveChat(padId string) error
- func (d SQLiteDB) RemovePad(padID string) error
- func (d SQLiteDB) RemovePad2ReadOnly(id string) error
- func (d SQLiteDB) RemoveReadOnly2Pad(id string) error
- func (d SQLiteDB) RemoveRevisionsOfPad(padId string) error
- func (d SQLiteDB) RemoveSessionById(sid string) *session2.Session
- func (d SQLiteDB) SaveAuthor(author db.AuthorDB)
- func (d SQLiteDB) SaveAuthorColor(authorId string, authorColor int)
- func (d SQLiteDB) SaveAuthorName(authorId string, authorName string)
- func (d SQLiteDB) SaveRevision(padId string, rev int, changeset string, text apool.AText, pool apool.APool, ...) error
- func (d SQLiteDB) SetAuthorByToken(token, authorId string) error
- func (d SQLiteDB) SetSessionById(sessionID string, session session2.Session)
- type SessionMethods
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorMethods ¶
type AuthorMethods interface {
GetAuthor(author string) (*db.AuthorDB, error)
GetAuthorByToken(token string) (*string, error)
SetAuthorByToken(token string, author string) error
SaveAuthor(author db.AuthorDB)
SaveAuthorName(authorId string, authorName string)
SaveAuthorColor(authorId string, authorColor int)
}
type ChatMethods ¶
type DataStore ¶
type DataStore interface {
PadMethods
AuthorMethods
PadMetaData
SessionMethods
GroupMethods
ChatMethods
}
type GroupMethods ¶
type MemoryDataStore ¶
type MemoryDataStore struct {
// contains filtered or unexported fields
}
func NewMemoryDataStore ¶
func NewMemoryDataStore() *MemoryDataStore
func (*MemoryDataStore) CreatePad ¶
func (m *MemoryDataStore) CreatePad(padID string, padDB db.PadDB) bool
func (*MemoryDataStore) CreatePad2ReadOnly ¶
func (m *MemoryDataStore) CreatePad2ReadOnly(padId string, readonlyId string)
func (*MemoryDataStore) CreateReadOnly2Pad ¶
func (m *MemoryDataStore) CreateReadOnly2Pad(padId string, readonlyId string)
func (*MemoryDataStore) DoesPadExist ¶
func (m *MemoryDataStore) DoesPadExist(padID string) bool
func (*MemoryDataStore) GetAuthor ¶
func (m *MemoryDataStore) GetAuthor(author string) (*db.AuthorDB, error)
func (*MemoryDataStore) GetAuthorByToken ¶
func (m *MemoryDataStore) GetAuthorByToken(token string) (*string, error)
func (*MemoryDataStore) GetGroup ¶
func (m *MemoryDataStore) GetGroup(groupId string) (*string, error)
func (*MemoryDataStore) GetPadIds ¶
func (m *MemoryDataStore) GetPadIds() []string
func (*MemoryDataStore) GetPadMetaData ¶
func (m *MemoryDataStore) GetPadMetaData(padId string, revNum int) (*db.PadMetaData, error)
func (*MemoryDataStore) GetReadOnly2Pad ¶
func (m *MemoryDataStore) GetReadOnly2Pad(id string) *string
func (*MemoryDataStore) GetReadonlyPad ¶
func (m *MemoryDataStore) GetReadonlyPad(padId string) (*string, error)
func (*MemoryDataStore) GetRevision ¶
func (m *MemoryDataStore) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
func (*MemoryDataStore) GetSessionById ¶
func (m *MemoryDataStore) GetSessionById(sessionID string) *session2.Session
func (*MemoryDataStore) RemoveChat ¶
func (m *MemoryDataStore) RemoveChat(padId string) error
func (*MemoryDataStore) RemovePad ¶
func (m *MemoryDataStore) RemovePad(padID string) error
func (*MemoryDataStore) RemovePad2ReadOnly ¶
func (m *MemoryDataStore) RemovePad2ReadOnly(id string) error
func (*MemoryDataStore) RemoveReadOnly2Pad ¶
func (m *MemoryDataStore) RemoveReadOnly2Pad(id string) error
func (*MemoryDataStore) RemoveRevisionsOfPad ¶
func (m *MemoryDataStore) RemoveRevisionsOfPad(padId string) error
func (*MemoryDataStore) RemoveSessionById ¶
func (m *MemoryDataStore) RemoveSessionById(sessionID string) *session2.Session
func (*MemoryDataStore) SaveAuthor ¶
func (m *MemoryDataStore) SaveAuthor(author db.AuthorDB)
func (*MemoryDataStore) SaveAuthorColor ¶
func (m *MemoryDataStore) SaveAuthorColor(authorId string, authorColor int)
func (*MemoryDataStore) SaveAuthorName ¶
func (m *MemoryDataStore) SaveAuthorName(authorId string, authorName string)
func (*MemoryDataStore) SaveRevision ¶
func (*MemoryDataStore) SetAuthorByToken ¶
func (m *MemoryDataStore) SetAuthorByToken(token string, author string) error
func (*MemoryDataStore) SetSessionById ¶
func (m *MemoryDataStore) SetSessionById(sessionID string, session session2.Session)
type PadMetaData ¶
type PadMetaData interface {
GetPadMetaData(padId string, revNum int) (*db.PadMetaData, error)
}
type PadMethods ¶
type PadMethods interface {
DoesPadExist(padID string) bool
RemovePad(padID string) error
CreatePad(padID string, padDB db.PadDB) bool
GetPadIds() []string
SaveRevision(padId string, rev int, changeset string, text apool.AText, pool apool.APool, authorId *string, timestamp int) error
GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
RemoveRevisionsOfPad(padId string) error
GetPad(padID string) (*db.PadDB, error)
GetReadonlyPad(padId string) (*string, error)
CreatePad2ReadOnly(padId string, readonlyId string)
CreateReadOnly2Pad(padId string, readonlyId string)
GetReadOnly2Pad(id string) *string
RemoveReadOnly2Pad(id string) error
RemovePad2ReadOnly(id string) error
}
type SQLiteDB ¶
type SQLiteDB struct {
// contains filtered or unexported fields
}
func NewDirtyDB ¶
NewDirtyDB This function creates a new SQLiteDB and returns a pointer to it.
func (SQLiteDB) CreatePad2ReadOnly ¶
func (SQLiteDB) CreateReadOnly2Pad ¶
func (SQLiteDB) DoesPadExist ¶
func (SQLiteDB) GetAuthor ¶
*
- Returns the Author Obj of the author
- @param {String} author The id of the author
func (SQLiteDB) GetAuthorByToken ¶
func (SQLiteDB) GetPadMetaData ¶
func (SQLiteDB) GetReadOnly2Pad ¶
func (SQLiteDB) GetRevision ¶
func (SQLiteDB) GetSessionById ¶
func (SQLiteDB) RemoveChat ¶
func (SQLiteDB) RemovePad2ReadOnly ¶
func (SQLiteDB) RemoveReadOnly2Pad ¶
func (SQLiteDB) RemoveRevisionsOfPad ¶
func (SQLiteDB) RemoveSessionById ¶
func (SQLiteDB) SaveAuthor ¶
func (SQLiteDB) SaveAuthorColor ¶
func (SQLiteDB) SaveAuthorName ¶
func (SQLiteDB) SaveRevision ¶
func (SQLiteDB) SetAuthorByToken ¶
Click to show internal directories.
Click to hide internal directories.