Documentation ¶
Overview ¶
Package t38c implements client for working with a Tile38 database.
Index ¶
- type Database
- func (db *Database) Close() error
- func (db *Database) Del(key string, id string) (err error)
- func (db *Database) Expire(key string, id string, seconds int) (err error)
- func (db *Database) Get(key string, id string, args ...string) (r *Response, err error)
- func (db *Database) PDel(key string, pattern string) (err error)
- func (db *Database) Persist(key string, id string) (err error)
- func (db *Database) Scan(key string, args ...string) (r *Response, err error)
- func (db *Database) Search(key string, args ...string) (r *Response, err error)
- func (db *Database) Set(key string, id string, args ...string) (err error)
- func (db *Database) TTL(key string, id string) (ttl float64, err error)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is the primary object for interacting with the database. Database should not be created directly, instead use Connect() to retrieve a fully-initialized Database ready to be used.
Functions other than Close() accept arguments in the same form as the Tile38 CLI. See https://tile38.com/commands/ for further information.
func (*Database) Get ¶
Get returns the requested entry as a response object, or nil if the object is not found.
func (*Database) Search ¶
Search iterates through the string values of a key returning a set of results.
type Response ¶
type Response struct { ID string Object string IDs []string Objects []string FieldNames map[string]int64 FieldValues []float64 Count int64 Cursor int64 TTL float64 Err string Elapsed string Ok bool Live bool Command string Group string Detect string Key string Time time.Time // contains filtered or unexported fields }
Response represents a database response.
func (*Response) UnmarshalText ¶
UnmarshalText implements the ability to unmarshal a database response.