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) 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
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) 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 ¶
Directories ¶
Path | Synopsis |
---|---|
This package contains functions shared by the parts of this project
|
This package contains functions shared by the parts of this project |