Documentation ¶
Index ¶
- func Create(hasura config.Hasura, cfg config.Database, views []string, ...) error
- type API
- func (api *API) CreateRestEndpoint(name, url, queryName, collectionName string) error
- func (api *API) CreateSelectPermissions(table, role string, perm Permission) error
- func (api *API) DropSelectPermissions(table, role string) error
- func (api *API) ExportMetadata(data *Metadata) (ExportMetadataResponse, error)
- func (api *API) Health() error
- func (api *API) ReplaceMetadata(data *Metadata) error
- func (api *API) TrackTable(schema, name string) error
- type Columns
- type Definition
- type ExportMetadataResponse
- type Metadata
- type Permission
- type Query
- type QueryCollection
- type SelectPermission
- type Table
- type TableSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API -
func (*API) CreateRestEndpoint ¶ added in v0.1.13
CreateRestEndpoint -
func (*API) CreateSelectPermissions ¶ added in v0.1.8
func (api *API) CreateSelectPermissions(table, role string, perm Permission) error
CreateSelectPermissions - A select permission is used to restrict access to only the specified columns and rows.
func (*API) DropSelectPermissions ¶ added in v0.1.9
DropSelectPermissions -
func (*API) ExportMetadata ¶
func (api *API) ExportMetadata(data *Metadata) (ExportMetadataResponse, error)
ExportMetadata -
func (*API) ReplaceMetadata ¶
ReplaceMetadata -
func (*API) TrackTable ¶ added in v0.1.6
TrackTable -
type Columns ¶ added in v0.1.13
type Columns []string
Columns -
func (Columns) MarshalJSON ¶ added in v0.1.13
MarshalJSON -
func (*Columns) UnmarshalJSON ¶ added in v0.1.13
UnmarshalJSON -
type Definition ¶ added in v0.1.13
type Definition struct {
Queries []Query `json:"queries"`
}
Definition -
type ExportMetadataResponse ¶
type ExportMetadataResponse struct {
Tables []Table `json:"tables"`
}
ExportMetadataResponse -
type Metadata ¶ added in v0.1.13
type Metadata struct { Version int `json:"version"` Tables []Table `json:"tables"` QueryCollections []QueryCollection `json:"query_collections,omitempty"` }
Metadata -
type Permission ¶ added in v0.1.8
type Permission struct { Columns Columns `json:"columns"` Limit uint64 `json:"limit"` AllowAggs bool `json:"allow_aggregations"` Filter interface{} `json:"filter,omitempty"` }
Permission -
type Query ¶ added in v0.1.13
type Query struct { Name string `json:"name"` Query string `json:"query,omitempty"` CollectionName string `json:"collection_name,omitempty"` }
Query -
type QueryCollection ¶ added in v0.1.13
type QueryCollection struct { Definition Definition `json:"definition"` Name string `json:"name"` }
QueryCollection -
type SelectPermission ¶ added in v0.1.13
type SelectPermission struct { Role string `json:"role"` Permission Permission `json:"permission"` }
SelectPermission -
type Table ¶ added in v0.1.13
type Table struct { ObjectRelationships []interface{} `json:"object_relationships"` ArrayRelationships []interface{} `json:"array_relationships"` SelectPermissions []SelectPermission `json:"select_permissions"` Schema TableSchema `json:"table"` }
Table -
type TableSchema ¶ added in v0.1.13
TableSchema -
Click to show internal directories.
Click to hide internal directories.