Documentation
¶
Index ¶
- Constants
- func CreateRandomPad() db2.PadDB
- func RandomString(length int) string
- func ReadToAuthorDB(reader Reader) (*db.AuthorDB, error)
- func ReadToPadDB(reader Reader) (*db.PadDB, error)
- type AuthorMethods
- type ChatMethods
- type DataStore
- type GroupMethods
- type MemoryDataStore
- func (m *MemoryDataStore) Close() error
- func (m *MemoryDataStore) CreatePad(padID string, padDB db.PadDB) error
- func (m *MemoryDataStore) CreatePad2ReadOnly(padId string, readonlyId string) errordeprecated
- func (m *MemoryDataStore) CreateReadOnly2Pad(padId string, readonlyId string) errordeprecated
- func (m *MemoryDataStore) DoesPadExist(padID string) (*bool, error)
- func (m *MemoryDataStore) GetAccessTokenRequestID(requestID string) (*string, error)
- func (m *MemoryDataStore) GetAuthor(authorId string) (*db.AuthorDB, error)
- func (m *MemoryDataStore) GetAuthorByToken(token string) (*string, error)
- func (m *MemoryDataStore) GetAuthorIdsOfPadChats(id string) (*[]string, error)
- func (m *MemoryDataStore) GetAuthors(ids []string) (*[]db.AuthorDB, error)
- func (m *MemoryDataStore) GetChatsOfPad(padId string, start int, end int) (*[]db.ChatMessageDBWithDisplayName, error)
- func (m *MemoryDataStore) GetGroup(groupId string) (*string, error)
- func (m *MemoryDataStore) GetPad(padID string) (*db.PadDB, error)
- func (m *MemoryDataStore) GetPadByReadOnlyId(readonlyId string) (*string, error)
- func (m *MemoryDataStore) GetPadIds() (*[]string, error)
- func (m *MemoryDataStore) GetPadIdsOfAuthor(authorId string) (*[]string, error)
- func (m *MemoryDataStore) GetReadOnly2Pad(id string) (*string, error)deprecated
- func (m *MemoryDataStore) GetReadonlyPad(padId string) (*string, error)
- func (m *MemoryDataStore) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
- func (m *MemoryDataStore) GetRevisions(padId string, startRev int, endRev int) (*[]db.PadSingleRevision, error)
- func (m *MemoryDataStore) GetSessionById(sessionID string) (*session2.Session, error)
- func (m *MemoryDataStore) QueryPad(offset int, limit int, sortBy string, ascending bool, pattern string) (*db.PadDBSearchResult, error)
- func (m *MemoryDataStore) RemoveChat(padId string) error
- func (m *MemoryDataStore) RemoveGroup(groupId string) error
- func (m *MemoryDataStore) RemovePad(padID string) error
- func (m *MemoryDataStore) RemovePad2ReadOnly(id string) errordeprecated
- func (m *MemoryDataStore) RemoveReadOnly2Pad(id string) errordeprecated
- func (m *MemoryDataStore) RemoveRevisionsOfPad(padId string) error
- func (m *MemoryDataStore) RemoveSessionById(sessionID string) error
- func (m *MemoryDataStore) SaveAccessTokenRequestID(requestID string, token string) error
- func (m *MemoryDataStore) SaveAuthor(author db.AuthorDB) error
- func (m *MemoryDataStore) SaveAuthorColor(authorId string, authorColor string) error
- func (m *MemoryDataStore) SaveAuthorName(authorId string, authorName string) error
- func (m *MemoryDataStore) SaveChatHeadOfPad(padId string, head int) error
- func (m *MemoryDataStore) SaveChatMessage(padId string, head int, authorId *string, timestamp int64, text string) error
- func (m *MemoryDataStore) SaveGroup(groupId string) error
- func (m *MemoryDataStore) SaveRevision(padId string, rev int, changeset string, text db.AText, pool db.RevPool, ...) error
- func (m *MemoryDataStore) SetAuthorByToken(token string, authorId string) error
- func (m *MemoryDataStore) SetReadOnlyId(padId string, readonlyId string) error
- func (m *MemoryDataStore) SetSessionById(sessionID string, session session2.Session) error
- type MySQLOptions
- type MysqlDB
- func (d MysqlDB) Close() error
- func (d MysqlDB) CreatePad(padID string, padDB db.PadDB) error
- func (d MysqlDB) DoesPadExist(padID string) (*bool, error)
- func (d MysqlDB) GetAuthor(authorId string) (*db.AuthorDB, error)
- func (d MysqlDB) GetAuthorByToken(token string) (*string, error)
- func (d MysqlDB) GetAuthorIdsOfPadChats(id string) (*[]string, error)
- func (d MysqlDB) GetAuthors(ids []string) (*[]db.AuthorDB, error)
- func (d MysqlDB) GetChatsOfPad(padId string, start int, end int) (*[]db.ChatMessageDBWithDisplayName, error)
- func (d MysqlDB) GetGroup(groupId string) (*string, error)
- func (d MysqlDB) GetPad(padID string) (*db.PadDB, error)
- func (d MysqlDB) GetPadByReadOnlyId(readonlyId string) (*string, error)
- func (d MysqlDB) GetPadIds() (*[]string, error)
- func (d MysqlDB) GetPadIdsOfAuthor(authorId string) (*[]string, error)
- func (d MysqlDB) GetReadonlyPad(padId string) (*string, error)
- func (d MysqlDB) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
- func (d MysqlDB) GetRevisions(padId string, startRev int, endRev int) (*[]db.PadSingleRevision, error)
- func (d MysqlDB) GetSessionById(sessionID string) (*session2.Session, error)
- func (d MysqlDB) QueryPad(offset int, limit int, sortBy string, ascending bool, pattern string) (*db.PadDBSearchResult, error)
- func (d MysqlDB) RemoveChat(padId string) error
- func (d MysqlDB) RemoveGroup(groupId string) error
- func (d MysqlDB) RemovePad(padID string) error
- func (d MysqlDB) RemoveRevisionsOfPad(padId string) error
- func (d MysqlDB) RemoveSessionById(sid string) error
- func (d MysqlDB) SaveAuthor(author db.AuthorDB) error
- func (d MysqlDB) SaveAuthorColor(authorId string, authorColor string) error
- func (d MysqlDB) SaveAuthorName(authorId string, authorName string) error
- func (d MysqlDB) SaveChatHeadOfPad(padId string, head int) error
- func (d MysqlDB) SaveChatMessage(padId string, head int, authorId *string, timestamp int64, text string) error
- func (d MysqlDB) SaveGroup(groupId string) error
- func (d MysqlDB) SaveRevision(padId string, rev int, changeset string, text db.AText, pool db.RevPool, ...) error
- func (d MysqlDB) SetAuthorByToken(token, authorId string) error
- func (d MysqlDB) SetReadOnlyId(padId string, readonlyId string) error
- func (d MysqlDB) SetSessionById(sessionID string, session session2.Session) error
- type PadMethods
- type PostgresDB
- func (d PostgresDB) Close() error
- func (d PostgresDB) CreatePad(padID string, padDB db.PadDB) error
- func (d PostgresDB) DoesPadExist(padID string) (*bool, error)
- func (d PostgresDB) GetAuthor(authorId string) (*db.AuthorDB, error)
- func (d PostgresDB) GetAuthorByToken(token string) (*string, error)
- func (d PostgresDB) GetAuthorIdsOfPadChats(id string) (*[]string, error)
- func (d PostgresDB) GetAuthors(ids []string) (*[]db.AuthorDB, error)
- func (d PostgresDB) GetChatsOfPad(padId string, start int, end int) (*[]db.ChatMessageDBWithDisplayName, error)
- func (d PostgresDB) GetGroup(groupId string) (*string, error)
- func (d PostgresDB) GetPad(padID string) (*db.PadDB, error)
- func (d PostgresDB) GetPadByReadOnlyId(readonlyId string) (*string, error)
- func (d PostgresDB) GetPadIds() (*[]string, error)
- func (d PostgresDB) GetPadIdsOfAuthor(authorId string) (*[]string, error)
- func (d PostgresDB) GetReadonlyPad(padId string) (*string, error)
- func (d PostgresDB) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
- func (d PostgresDB) GetRevisions(padId string, startRev int, endRev int) (*[]db.PadSingleRevision, error)
- func (d PostgresDB) GetSessionById(sessionID string) (*session2.Session, error)
- func (d PostgresDB) QueryPad(offset int, limit int, sortBy string, ascending bool, pattern string) (*db.PadDBSearchResult, error)
- func (d PostgresDB) RemoveChat(padId string) error
- func (d PostgresDB) RemoveGroup(groupId string) error
- func (d PostgresDB) RemovePad(padID string) error
- func (d PostgresDB) RemoveRevisionsOfPad(padId string) error
- func (d PostgresDB) RemoveSessionById(sid string) error
- func (d PostgresDB) SaveAuthor(author db.AuthorDB) error
- func (d PostgresDB) SaveAuthorColor(authorId string, authorColor string) error
- func (d PostgresDB) SaveAuthorName(authorId string, authorName string) error
- func (d PostgresDB) SaveChatHeadOfPad(padId string, head int) error
- func (d PostgresDB) SaveChatMessage(padId string, head int, authorId *string, timestamp int64, text string) error
- func (d PostgresDB) SaveGroup(groupId string) error
- func (d PostgresDB) SaveRevision(padId string, rev int, changeset string, text db.AText, pool db.RevPool, ...) error
- func (d PostgresDB) SetAuthorByToken(token, authorId string) error
- func (d PostgresDB) SetReadOnlyId(padId string, readonlyId string) error
- func (d PostgresDB) SetSessionById(sessionID string, session session2.Session) error
- type PostgresOptions
- type Reader
- type SQLiteDB
- func (d SQLiteDB) Close() error
- func (d SQLiteDB) CreatePad(padID string, padDB db.PadDB) error
- func (d SQLiteDB) DoesPadExist(padID string) (*bool, error)
- func (d SQLiteDB) GetAuthor(authorId string) (*db.AuthorDB, error)
- func (d SQLiteDB) GetAuthorByToken(token string) (*string, error)
- func (d SQLiteDB) GetAuthorIdsOfPadChats(id string) (*[]string, error)
- func (d SQLiteDB) GetAuthors(ids []string) (*[]db.AuthorDB, error)
- func (d SQLiteDB) GetChatsOfPad(padId string, start int, end int) (*[]db.ChatMessageDBWithDisplayName, error)
- func (d SQLiteDB) GetGroup(groupId string) (*string, error)
- func (d SQLiteDB) GetPad(padID string) (*db.PadDB, error)
- func (d SQLiteDB) GetPadByReadOnlyId(readonlyId string) (*string, error)
- func (d SQLiteDB) GetPadIds() (*[]string, error)
- func (d SQLiteDB) GetPadIdsOfAuthor(authorId string) (*[]string, error)
- func (d SQLiteDB) GetReadonlyPad(padId string) (*string, error)
- func (d SQLiteDB) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
- func (d SQLiteDB) GetRevisions(padId string, startRev int, endRev int) (*[]db.PadSingleRevision, error)
- func (d SQLiteDB) GetSessionById(sessionID string) (*session2.Session, error)
- func (d SQLiteDB) QueryPad(offset int, limit int, sortBy string, ascending bool, pattern string) (*db.PadDBSearchResult, error)
- func (d SQLiteDB) RemoveChat(padId string) error
- func (d SQLiteDB) RemoveGroup(groupId string) error
- func (d SQLiteDB) RemovePad(padID string) error
- func (d SQLiteDB) RemoveRevisionsOfPad(padId string) error
- func (d SQLiteDB) RemoveSessionById(sid string) error
- func (d SQLiteDB) SaveAuthor(author db.AuthorDB) error
- func (d SQLiteDB) SaveAuthorColor(authorId string, authorColor string) error
- func (d SQLiteDB) SaveAuthorName(authorId string, authorName string) error
- func (d SQLiteDB) SaveChatHeadOfPad(padId string, head int) error
- func (d SQLiteDB) SaveChatMessage(padId string, head int, authorId *string, timestamp int64, text string) error
- func (d SQLiteDB) SaveGroup(groupId string) error
- func (d SQLiteDB) SaveRevision(padId string, rev int, changeset string, text db.AText, pool db.RevPool, ...) error
- func (d SQLiteDB) SetAuthorByToken(token, authorId string) error
- func (d SQLiteDB) SetReadOnlyId(padId string, readonlyId string) error
- func (d SQLiteDB) SetSessionById(sessionID string, session session2.Session) error
- type SessionMethods
Constants ¶
View Source
const AuthorNotFoundError = "author not found"
View Source
const PadDoesNotExistError = "pad not found"
View Source
const PadReadOnlyIdNotFoundError = "pad read only id not found"
View Source
const PadRevisionNotFoundError = "pad revision not found"
View Source
const SessionNotFoundError = "session not found"
Variables ¶
This section is empty.
Functions ¶
func CreateRandomPad ¶ added in v0.0.2
func RandomString ¶ added in v0.0.4
Types ¶
type AuthorMethods ¶
type AuthorMethods interface {
GetAuthor(author string) (*db.AuthorDB, error)
GetPadIdsOfAuthor(authorId string) (*[]string, error)
GetAuthorByToken(token string) (*string, error)
SetAuthorByToken(token string, author string) error
SaveAuthor(author db.AuthorDB) error
SaveAuthorName(authorId string, authorName string) error
SaveAuthorColor(authorId string, authorColor string) error
GetAuthors(ids []string) (*[]db.AuthorDB, error)
}
type ChatMethods ¶
type ChatMethods interface {
RemoveChat(padId string) error
SaveChatMessage(padId string, head int, authorId *string, timestamp int64, text string) error
GetChatsOfPad(padId string, start int, end int) (*[]db.ChatMessageDBWithDisplayName, error)
GetAuthorIdsOfPadChats(id string) (*[]string, error)
}
type DataStore ¶
type DataStore interface {
PadMethods
AuthorMethods
SessionMethods
GroupMethods
ChatMethods
Close() error
}
type GroupMethods ¶
type MemoryDataStore ¶
type MemoryDataStore struct {
// contains filtered or unexported fields
}
func NewMemoryDataStore ¶
func NewMemoryDataStore() *MemoryDataStore
func (*MemoryDataStore) Close ¶ added in v0.0.2
func (m *MemoryDataStore) Close() error
func (*MemoryDataStore) CreatePad ¶
func (m *MemoryDataStore) CreatePad(padID string, padDB db.PadDB) error
func (*MemoryDataStore) CreatePad2ReadOnly
deprecated
func (m *MemoryDataStore) CreatePad2ReadOnly(padId string, readonlyId string) error
Deprecated: Use SetReadOnlyId instead
func (*MemoryDataStore) CreateReadOnly2Pad
deprecated
func (m *MemoryDataStore) CreateReadOnly2Pad(padId string, readonlyId string) error
Deprecated: Use SetReadOnlyId instead - readonly2pad is derived from pad store
func (*MemoryDataStore) DoesPadExist ¶
func (m *MemoryDataStore) DoesPadExist(padID string) (*bool, error)
func (*MemoryDataStore) GetAccessTokenRequestID ¶ added in v0.0.2
func (m *MemoryDataStore) GetAccessTokenRequestID(requestID string) (*string, error)
func (*MemoryDataStore) GetAuthor ¶
func (m *MemoryDataStore) GetAuthor(authorId string) (*db.AuthorDB, error)
func (*MemoryDataStore) GetAuthorByToken ¶
func (m *MemoryDataStore) GetAuthorByToken(token string) (*string, error)
func (*MemoryDataStore) GetAuthorIdsOfPadChats ¶ added in v0.0.4
func (m *MemoryDataStore) GetAuthorIdsOfPadChats(id string) (*[]string, error)
func (*MemoryDataStore) GetAuthors ¶ added in v0.0.4
func (m *MemoryDataStore) GetAuthors(ids []string) (*[]db.AuthorDB, error)
func (*MemoryDataStore) GetChatsOfPad ¶ added in v0.0.2
func (m *MemoryDataStore) GetChatsOfPad( padId string, start int, end int, ) (*[]db.ChatMessageDBWithDisplayName, error)
func (*MemoryDataStore) GetGroup ¶
func (m *MemoryDataStore) GetGroup(groupId string) (*string, error)
func (*MemoryDataStore) GetPadByReadOnlyId ¶ added in v0.0.4
func (m *MemoryDataStore) GetPadByReadOnlyId(readonlyId string) (*string, error)
func (*MemoryDataStore) GetPadIds ¶
func (m *MemoryDataStore) GetPadIds() (*[]string, error)
func (*MemoryDataStore) GetPadIdsOfAuthor ¶ added in v0.0.4
func (m *MemoryDataStore) GetPadIdsOfAuthor(authorId string) (*[]string, error)
func (*MemoryDataStore) GetReadOnly2Pad
deprecated
func (m *MemoryDataStore) GetReadOnly2Pad(id string) (*string, error)
Deprecated: Use GetPadByReadOnlyId instead
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) GetRevisions ¶ added in v0.0.2
func (m *MemoryDataStore) GetRevisions(padId string, startRev int, endRev int) (*[]db.PadSingleRevision, error)
func (*MemoryDataStore) GetSessionById ¶
func (m *MemoryDataStore) GetSessionById(sessionID string) (*session2.Session, error)
func (*MemoryDataStore) QueryPad ¶ added in v0.0.2
func (m *MemoryDataStore) QueryPad( offset int, limit int, sortBy string, ascending bool, pattern string, ) (*db.PadDBSearchResult, error)
func (*MemoryDataStore) RemoveChat ¶
func (m *MemoryDataStore) RemoveChat(padId string) error
func (*MemoryDataStore) RemoveGroup ¶ added in v0.0.2
func (m *MemoryDataStore) RemoveGroup(groupId string) error
func (*MemoryDataStore) RemovePad ¶
func (m *MemoryDataStore) RemovePad(padID string) error
func (*MemoryDataStore) RemovePad2ReadOnly
deprecated
func (m *MemoryDataStore) RemovePad2ReadOnly(id string) error
Deprecated: Handled by RemovePad
func (*MemoryDataStore) RemoveReadOnly2Pad
deprecated
func (m *MemoryDataStore) RemoveReadOnly2Pad(id string) error
Deprecated: Handled by RemovePad
func (*MemoryDataStore) RemoveRevisionsOfPad ¶
func (m *MemoryDataStore) RemoveRevisionsOfPad(padId string) error
func (*MemoryDataStore) RemoveSessionById ¶
func (m *MemoryDataStore) RemoveSessionById(sessionID string) error
func (*MemoryDataStore) SaveAccessTokenRequestID ¶ added in v0.0.2
func (m *MemoryDataStore) SaveAccessTokenRequestID(requestID string, token string) error
func (*MemoryDataStore) SaveAuthor ¶
func (m *MemoryDataStore) SaveAuthor(author db.AuthorDB) error
func (*MemoryDataStore) SaveAuthorColor ¶
func (m *MemoryDataStore) SaveAuthorColor(authorId string, authorColor string) error
func (*MemoryDataStore) SaveAuthorName ¶
func (m *MemoryDataStore) SaveAuthorName(authorId string, authorName string) error
func (*MemoryDataStore) SaveChatHeadOfPad ¶ added in v0.0.2
func (m *MemoryDataStore) SaveChatHeadOfPad(padId string, head int) error
func (*MemoryDataStore) SaveChatMessage ¶ added in v0.0.2
func (*MemoryDataStore) SaveGroup ¶ added in v0.0.2
func (m *MemoryDataStore) SaveGroup(groupId string) error
func (*MemoryDataStore) SaveRevision ¶
func (*MemoryDataStore) SetAuthorByToken ¶
func (m *MemoryDataStore) SetAuthorByToken(token string, authorId string) error
func (*MemoryDataStore) SetReadOnlyId ¶ added in v0.0.4
func (m *MemoryDataStore) SetReadOnlyId(padId string, readonlyId string) error
func (*MemoryDataStore) SetSessionById ¶
func (m *MemoryDataStore) SetSessionById(sessionID string, session session2.Session) error
type MySQLOptions ¶ added in v0.0.2
type MysqlDB ¶ added in v0.0.2
type MysqlDB struct {
// contains filtered or unexported fields
}
func NewMySQLDB ¶ added in v0.0.2
func NewMySQLDB(options MySQLOptions) (*MysqlDB, error)
func (MysqlDB) DoesPadExist ¶ added in v0.0.2
func (MysqlDB) GetAuthorByToken ¶ added in v0.0.2
func (MysqlDB) GetAuthorIdsOfPadChats ¶ added in v0.0.4
func (MysqlDB) GetAuthors ¶ added in v0.0.4
func (MysqlDB) GetChatsOfPad ¶ added in v0.0.2
func (MysqlDB) GetPadByReadOnlyId ¶ added in v0.0.4
func (MysqlDB) GetPadIdsOfAuthor ¶ added in v0.0.4
func (MysqlDB) GetReadonlyPad ¶ added in v0.0.2
func (MysqlDB) GetRevision ¶ added in v0.0.2
func (MysqlDB) GetRevisions ¶ added in v0.0.2
func (MysqlDB) GetSessionById ¶ added in v0.0.2
func (MysqlDB) RemoveChat ¶ added in v0.0.2
func (MysqlDB) RemoveGroup ¶ added in v0.0.2
func (MysqlDB) RemoveRevisionsOfPad ¶ added in v0.0.2
func (MysqlDB) RemoveSessionById ¶ added in v0.0.2
func (MysqlDB) SaveAuthorColor ¶ added in v0.0.2
func (MysqlDB) SaveAuthorName ¶ added in v0.0.2
func (MysqlDB) SaveChatHeadOfPad ¶ added in v0.0.2
func (MysqlDB) SaveChatMessage ¶ added in v0.0.2
func (MysqlDB) SaveRevision ¶ added in v0.0.2
func (MysqlDB) SetAuthorByToken ¶ added in v0.0.2
func (MysqlDB) SetReadOnlyId ¶ added in v0.0.4
type PadMethods ¶
type PadMethods interface {
DoesPadExist(padID string) (*bool, error)
RemovePad(padID string) error
CreatePad(padID string, padDB db.PadDB) error
GetPadIds() (*[]string, error)
SaveRevision(padId string, rev int, changeset string, text db.AText, pool db.RevPool, authorId *string, timestamp int64) error
GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
RemoveRevisionsOfPad(padId string) error
GetRevisions(padId string, startRev int, endRev int) (*[]db.PadSingleRevision, error)
GetPad(padID string) (*db.PadDB, error)
GetReadonlyPad(padId string) (*string, error)
SetReadOnlyId(padId string, readOnlyId string) error
GetPadByReadOnlyId(id string) (*string, error)
SaveChatHeadOfPad(padId string, head int) error
QueryPad(offset int, limit int, sortBy string, ascending bool, pattern string) (*db.PadDBSearchResult, error)
}
type PostgresDB ¶ added in v0.0.2
type PostgresDB struct {
// contains filtered or unexported fields
}
func NewPostgresDB ¶ added in v0.0.2
func NewPostgresDB(options PostgresOptions) (*PostgresDB, error)
func (PostgresDB) Close ¶ added in v0.0.2
func (d PostgresDB) Close() error
func (PostgresDB) CreatePad ¶ added in v0.0.2
func (d PostgresDB) CreatePad(padID string, padDB db.PadDB) error
func (PostgresDB) DoesPadExist ¶ added in v0.0.2
func (d PostgresDB) DoesPadExist(padID string) (*bool, error)
func (PostgresDB) GetAuthor ¶ added in v0.0.2
func (d PostgresDB) GetAuthor(authorId string) (*db.AuthorDB, error)
func (PostgresDB) GetAuthorByToken ¶ added in v0.0.2
func (d PostgresDB) GetAuthorByToken(token string) (*string, error)
func (PostgresDB) GetAuthorIdsOfPadChats ¶ added in v0.0.4
func (d PostgresDB) GetAuthorIdsOfPadChats(id string) (*[]string, error)
func (PostgresDB) GetAuthors ¶ added in v0.0.4
func (d PostgresDB) GetAuthors( ids []string, ) (*[]db.AuthorDB, error)
func (PostgresDB) GetChatsOfPad ¶ added in v0.0.2
func (d PostgresDB) GetChatsOfPad( padId string, start int, end int, ) (*[]db.ChatMessageDBWithDisplayName, error)
func (PostgresDB) GetGroup ¶ added in v0.0.2
func (d PostgresDB) GetGroup(groupId string) (*string, error)
func (PostgresDB) GetPad ¶ added in v0.0.2
func (d PostgresDB) GetPad(padID string) (*db.PadDB, error)
func (PostgresDB) GetPadByReadOnlyId ¶ added in v0.0.4
func (d PostgresDB) GetPadByReadOnlyId(readonlyId string) (*string, error)
func (PostgresDB) GetPadIds ¶ added in v0.0.2
func (d PostgresDB) GetPadIds() (*[]string, error)
func (PostgresDB) GetPadIdsOfAuthor ¶ added in v0.0.4
func (d PostgresDB) GetPadIdsOfAuthor(authorId string) (*[]string, error)
func (PostgresDB) GetReadonlyPad ¶ added in v0.0.2
func (d PostgresDB) GetReadonlyPad(padId string) (*string, error)
func (PostgresDB) GetRevision ¶ added in v0.0.2
func (d PostgresDB) GetRevision(padId string, rev int) (*db.PadSingleRevision, error)
func (PostgresDB) GetRevisions ¶ added in v0.0.2
func (d PostgresDB) GetRevisions( padId string, startRev int, endRev int, ) (*[]db.PadSingleRevision, error)
func (PostgresDB) GetSessionById ¶ added in v0.0.2
func (d PostgresDB) GetSessionById(sessionID string) (*session2.Session, error)
func (PostgresDB) QueryPad ¶ added in v0.0.2
func (d PostgresDB) QueryPad( offset int, limit int, sortBy string, ascending bool, pattern string, ) (*db.PadDBSearchResult, error)
func (PostgresDB) RemoveChat ¶ added in v0.0.2
func (d PostgresDB) RemoveChat(padId string) error
func (PostgresDB) RemoveGroup ¶ added in v0.0.2
func (d PostgresDB) RemoveGroup(groupId string) error
func (PostgresDB) RemovePad ¶ added in v0.0.2
func (d PostgresDB) RemovePad(padID string) error
func (PostgresDB) RemoveRevisionsOfPad ¶ added in v0.0.2
func (d PostgresDB) RemoveRevisionsOfPad(padId string) error
func (PostgresDB) RemoveSessionById ¶ added in v0.0.2
func (d PostgresDB) RemoveSessionById(sid string) error
func (PostgresDB) SaveAuthor ¶ added in v0.0.2
func (d PostgresDB) SaveAuthor(author db.AuthorDB) error
func (PostgresDB) SaveAuthorColor ¶ added in v0.0.2
func (d PostgresDB) SaveAuthorColor(authorId string, authorColor string) error
func (PostgresDB) SaveAuthorName ¶ added in v0.0.2
func (d PostgresDB) SaveAuthorName(authorId string, authorName string) error
func (PostgresDB) SaveChatHeadOfPad ¶ added in v0.0.2
func (d PostgresDB) SaveChatHeadOfPad(padId string, head int) error
func (PostgresDB) SaveChatMessage ¶ added in v0.0.2
func (PostgresDB) SaveGroup ¶ added in v0.0.2
func (d PostgresDB) SaveGroup(groupId string) error
func (PostgresDB) SaveRevision ¶ added in v0.0.2
func (PostgresDB) SetAuthorByToken ¶ added in v0.0.2
func (d PostgresDB) SetAuthorByToken(token, authorId string) error
func (PostgresDB) SetReadOnlyId ¶ added in v0.0.4
func (d PostgresDB) SetReadOnlyId(padId string, readonlyId string) error
func (PostgresDB) SetSessionById ¶ added in v0.0.2
func (d PostgresDB) SetSessionById(sessionID string, session session2.Session) error
type PostgresOptions ¶ added in v0.0.2
type SQLiteDB ¶
type SQLiteDB struct {
// contains filtered or unexported fields
}
func NewSQLiteDB ¶ added in v0.0.2
NewSQLiteDB creates a new SQLiteDB and returns a pointer to it.
func (SQLiteDB) GetAuthorByToken ¶
func (SQLiteDB) GetAuthorIdsOfPadChats ¶ added in v0.0.4
func (SQLiteDB) GetAuthors ¶ added in v0.0.4
func (SQLiteDB) GetChatsOfPad ¶ added in v0.0.2
func (SQLiteDB) GetPadByReadOnlyId ¶ added in v0.0.4
func (SQLiteDB) GetPadIdsOfAuthor ¶ added in v0.0.4
func (SQLiteDB) GetRevision ¶
func (SQLiteDB) GetRevisions ¶ added in v0.0.2
func (SQLiteDB) GetSessionById ¶
func (SQLiteDB) RemoveChat ¶
func (SQLiteDB) RemoveGroup ¶ added in v0.0.2
func (SQLiteDB) RemoveRevisionsOfPad ¶
func (SQLiteDB) RemoveSessionById ¶
func (SQLiteDB) SaveAuthorColor ¶
func (SQLiteDB) SaveAuthorName ¶
func (SQLiteDB) SaveChatHeadOfPad ¶ added in v0.0.2
func (SQLiteDB) SaveChatMessage ¶ added in v0.0.2
func (SQLiteDB) SaveRevision ¶
func (SQLiteDB) SetAuthorByToken ¶
func (SQLiteDB) SetReadOnlyId ¶ added in v0.0.4
Source Files
¶
Click to show internal directories.
Click to hide internal directories.