Documentation ¶
Index ¶
- Constants
- func GoogleApiClient() *http.Client
- type Database
- func (d *Database) DeleteSingleDocument(ctx context.Context, tab string, header string) error
- func (d *Database) GetSingleDocument(ctx context.Context, tab string, header string) (*DocumentResponse, error)
- func (d *Database) SetSingleDocument(ctx context.Context, tab string, header string, content map[string]interface{}) error
- func (d *Database) UpdateSingleDocument(ctx context.Context, tab string, header string, content map[string]interface{}) error
- type DocumentResponse
Constants ¶
View Source
const DocumentSeperator string = "========================================================================\n"
Variables ¶
This section is empty.
Functions ¶
func GoogleApiClient ¶
GoogleApiClient returns the configuration for authenticating to Google API
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) DeleteSingleDocument ¶
Delete removes a document
func (*Database) GetSingleDocument ¶
func (d *Database) GetSingleDocument(ctx context.Context, tab string, header string) (*DocumentResponse, error)
Get retreives the data of a document
func (*Database) SetSingleDocument ¶
func (d *Database) SetSingleDocument(ctx context.Context, tab string, header string, content map[string]interface{}) error
Set updates a document by overriding ALL fields. To merge to an existing document, use Update. If the document does not exist, it creates a new document with the given document id
type DocumentResponse ¶
Click to show internal directories.
Click to hide internal directories.