Documentation ¶
Overview ¶
A library that provides a Go client to Slicing Dice API
Index ¶
- Constants
- type APIKey
- type SDError
- type SlicingDice
- func (s *SlicingDice) Aggregation(query map[string]interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) CountEntity(query interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) CountEntityTotal(data ...[]string) (map[string]interface{}, error)
- func (s *SlicingDice) CountEvent(query interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) CreateColumn(query interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) CreateSavedQuery(query map[string]interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) DecodeJSON(jsonData string) interface{}
- func (s *SlicingDice) DeleteSavedQuery(queryName string) (map[string]interface{}, error)
- func (s *SlicingDice) ExistsEntity(ids []string, dimension string) (map[string]interface{}, error)
- func (s *SlicingDice) GetColumns() (map[string]interface{}, error)
- func (s *SlicingDice) GetDatabase() (map[string]interface{}, error)
- func (s *SlicingDice) GetSavedQueries() (map[string]interface{}, error)
- func (s *SlicingDice) GetSavedQuery(queryName string) (map[string]interface{}, error)
- func (s *SlicingDice) Insert(query map[string]interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) Result(query map[string]interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) Score(query map[string]interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) Sql(query string) (map[string]interface{}, error)
- func (s *SlicingDice) TopValues(query map[string]interface{}) (map[string]interface{}, error)
- func (s *SlicingDice) UpdateSavedQuery(queryName string, query map[string]interface{}) (map[string]interface{}, error)
Constants ¶
const ( RESULT = "/data_extraction/result/" SCORE = "/data_extraction/score/" INSERT = "/insert/" COLUMN = "/column/" DATABASE = "/database/" TOP_VALUES = "/query/top_values/" EXISTS_ENTITY = "/query/exists/entity/" COUNT_ENTITY = "/query/count/entity/" COUNT_ENTITY_TOTAL = "/query/count/entity/total/" COUNT_EVENT = "/query/count/event/" AGGREGATION = "/query/aggregation/" SAVED = "/query/saved/" SQL = "/sql/" )
All these constants representing all endpoints available in SlicingDice API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
APIKey is used to access the keys that we insert in the SlicingDice API.
There is only one rule: if you put the master key, you do not put the other, because already by default the client uses for everything. Otherwise, use a key to writing, if you want to write (insert data, create columns) and use a key to reading (make queries).
type SlicingDice ¶
type SlicingDice struct { Test bool // contains filtered or unexported fields }
SlicingDice is the main structure of slicingdice. Through it, we will make queries, we will create columns, we'll take databases, etc.
func (*SlicingDice) Aggregation ¶
func (s *SlicingDice) Aggregation(query map[string]interface{}) (map[string]interface{}, error)
Aggregation makes a aggregation query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) CountEntity ¶
func (s *SlicingDice) CountEntity(query interface{}) (map[string]interface{}, error)
CountEntity makes a count entity query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) CountEntityTotal ¶
func (s *SlicingDice) CountEntityTotal(data ...[]string) (map[string]interface{}, error)
CountEntityTotal get total of entity query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) CountEvent ¶
func (s *SlicingDice) CountEvent(query interface{}) (map[string]interface{}, error)
CountEvent makes a count event query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) CreateColumn ¶
func (s *SlicingDice) CreateColumn(query interface{}) (map[string]interface{}, error)
CreateColumn create a column in SlicingDice It returns a JSON converted in map[string]interface{}
func (*SlicingDice) CreateSavedQuery ¶
func (s *SlicingDice) CreateSavedQuery(query map[string]interface{}) (map[string]interface{}, error)
CreateSavedQuery created a saved query in SlicingDice It returns a JSON converted in map[string]interface{}
func (*SlicingDice) DecodeJSON ¶
func (s *SlicingDice) DecodeJSON(jsonData string) interface{}
DecodeJSON converts string JSON to map[string]interface{}, its length is 0 in case of JSON parsing error
func (*SlicingDice) DeleteSavedQuery ¶
func (s *SlicingDice) DeleteSavedQuery(queryName string) (map[string]interface{}, error)
DeleteSavedQuery delete a saved query by name It returns a JSON converted in map[string]interface{}
func (*SlicingDice) ExistsEntity ¶
func (s *SlicingDice) ExistsEntity(ids []string, dimension string) (map[string]interface{}, error)
ExistsEntity makes a exists entity query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) GetColumns ¶
func (s *SlicingDice) GetColumns() (map[string]interface{}, error)
GetColumns get columns stored in your SlicingDice account It returns a JSON converted in map[string]interface{}
func (*SlicingDice) GetDatabase ¶
func (s *SlicingDice) GetDatabase() (map[string]interface{}, error)
GetDatabase gets information about the current SlicingDice database It returns a JSON converted in map[string]interface{}
func (*SlicingDice) GetSavedQueries ¶
func (s *SlicingDice) GetSavedQueries() (map[string]interface{}, error)
GetSavedQueries get all saved queryName It returns a JSON converted in map[string]interface{}
func (*SlicingDice) GetSavedQuery ¶
func (s *SlicingDice) GetSavedQuery(queryName string) (map[string]interface{}, error)
GetSavedQuery get a saved query by name It returns a JSON converted in map[string]interface{}
func (*SlicingDice) Insert ¶
func (s *SlicingDice) Insert(query map[string]interface{}) (map[string]interface{}, error)
Inserts data in a SlicingDice database. It returns a JSON converted in map[string]interface{}
func (*SlicingDice) Result ¶
func (s *SlicingDice) Result(query map[string]interface{}) (map[string]interface{}, error)
Result makes a data extraction result query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) Score ¶
func (s *SlicingDice) Score(query map[string]interface{}) (map[string]interface{}, error)
Score makes a data extraction score query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) TopValues ¶
func (s *SlicingDice) TopValues(query map[string]interface{}) (map[string]interface{}, error)
TopValues makes a top values query It returns a JSON converted in map[string]interface{}
func (*SlicingDice) UpdateSavedQuery ¶
func (s *SlicingDice) UpdateSavedQuery(queryName string, query map[string]interface{}) (map[string]interface{}, error)
UpdateSavedQuery update a saved query in SlicingDice by name It returns a JSON converted in map[string]interface{}