Documentation ¶
Overview ¶
this package 'flaarum' is the golang library for communicating with the flaarum server.
Index ¶
- func RightDateFormat(d time.Time) string
- func RightDateTimeFormat(d time.Time) string
- type Client
- func (cl Client) AllRowsCount(tableName string) (int64, error)
- func (cl Client) CountRows(stmt string) (int64, error)
- func (cl *Client) CreateProject(projName string) error
- func (cl *Client) CreateTable(stmt string) error
- func (cl Client) DeleteFields(stmt string, toDeleteFields []string) error
- func (cl *Client) DeleteProject(projName string) error
- func (cl Client) DeleteRows(stmt string) error
- func (cl *Client) DeleteTable(tableName string) error
- func (cl *Client) EmptyTable(tableName string) error
- func (cl *Client) GetCurrentTableStructureParsed(tableName string) (flaarum_shared.TableStruct, error)
- func (cl *Client) GetCurrentTableVersionNum(tableName string) (int64, error)
- func (cl *Client) GetTableStructure(tableName string, versionNum int64) (string, error)
- func (cl *Client) GetTableStructureParsed(tableName string, versionNum int64) (flaarum_shared.TableStruct, error)
- func (cl *Client) InsertRowAny(tableName string, toInsert map[string]interface{}) (string, error)
- func (cl *Client) InsertRowStr(tableName string, toInsert map[string]string) (string, error)
- func (cl *Client) ListProjects() ([]string, error)
- func (cl Client) ListTables() ([]string, error)
- func (cl *Client) ParseRow(rowStr map[string]string, tableStruct flaarum_shared.TableStruct) (map[string]interface{}, error)
- func (cl *Client) Ping() error
- func (cl *Client) RenameProject(projName, newProjName string) error
- func (cl *Client) RenameTable(tableName, newTableName string) error
- func (cl *Client) Search(stmt string) (*[]map[string]interface{}, error)
- func (cl Client) SearchForOne(stmt string) (*map[string]interface{}, error)
- func (cl Client) SumRows(stmt, toSumField string) (interface{}, error)
- func (cl Client) UpdateRowsAny(stmt string, updateData map[string]interface{}) error
- func (cl Client) UpdateRowsStr(stmt string, updateDataStr map[string]string) error
- func (cl *Client) UpdateTableStructure(stmt string) error
- type ConnError
- type ServerError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RightDateFormat ¶
Converts a time.Time to the date format expected in flaarum
func RightDateTimeFormat ¶
Converts a time.Time to the datetime format expected in flaarum
Types ¶
type Client ¶
func (Client) AllRowsCount ¶ added in v1.6.8
func (*Client) CreateProject ¶
func (*Client) CreateTable ¶
func (Client) DeleteFields ¶
func (*Client) DeleteProject ¶
func (Client) DeleteRows ¶
func (*Client) DeleteTable ¶
func (*Client) EmptyTable ¶
func (*Client) GetCurrentTableStructureParsed ¶
func (cl *Client) GetCurrentTableStructureParsed(tableName string) (flaarum_shared.TableStruct, error)
func (*Client) GetCurrentTableVersionNum ¶
func (*Client) GetTableStructure ¶
func (*Client) GetTableStructureParsed ¶
func (cl *Client) GetTableStructureParsed(tableName string, versionNum int64) (flaarum_shared.TableStruct, error)
func (*Client) InsertRowAny ¶
InsertRowStr inserts a row into a table. It expects the toInsert to be of type map[string]interface{}.
func (*Client) InsertRowStr ¶
InsertRowStr inserts a row into a table. It expects the input to be of type map[string]string. It returns a string which is parsable to an int64 for proper tables. For 'logs' tables it returns a string which is not parsable to int64
func (*Client) ListProjects ¶
func (Client) ListTables ¶
func (*Client) ParseRow ¶
func (cl *Client) ParseRow(rowStr map[string]string, tableStruct flaarum_shared.TableStruct) (map[string]interface{}, error)
ParseRow given a TableStruct would convert a map of strings to a map of interfaces.
func (*Client) RenameProject ¶
func (*Client) RenameTable ¶
func (Client) SearchForOne ¶
func (Client) SumRows ¶
Sums the fields of a row and returns int64 if it is an int field or float64 if it a float field.
func (Client) UpdateRowsAny ¶
func (Client) UpdateRowsStr ¶
func (*Client) UpdateTableStructure ¶
type ConnError ¶ added in v1.7.11
type ConnError struct {
// contains filtered or unexported fields
}
type ServerError ¶ added in v1.7.11
type ServerError struct {
// contains filtered or unexported fields
}
func (ServerError) Error ¶ added in v1.7.11
func (e ServerError) Error() string
type ValidationError ¶ added in v1.7.11
type ValidationError struct {
// contains filtered or unexported fields
}
func (ValidationError) Error ¶ added in v1.7.11
func (e ValidationError) Error() string
Directories ¶
Path | Synopsis |
---|---|
cli provides a terminal interface to the flaarum server.
|
cli provides a terminal interface to the flaarum server. |
inout creates compressed backup files and can restore a flaarum project from the said files.
|
inout creates compressed backup files and can restore a flaarum project from the said files. |
This package contains functions shared by the programs of this project.
|
This package contains functions shared by the programs of this project. |
gcpasr is the autoscaling resizer for Google Cloud projects.
|
gcpasr is the autoscaling resizer for Google Cloud projects. |
inout creates compressed backup files and can restore a flaarum project from the said files.
|
inout creates compressed backup files and can restore a flaarum project from the said files. |
lgcp is the launcher program for Google Cloud platform
|
lgcp is the launcher program for Google Cloud platform |
prod provides the commands which helps in making a flaarum server production ready.
|
prod provides the commands which helps in making a flaarum server production ready. |
statsr repeatedly stores the CPU and RAM usage of a server.
|
statsr repeatedly stores the CPU and RAM usage of a server. |
This is the server that accepts and stores data from clients.
|
This is the server that accepts and stores data from clients. |