Documentation ¶
Index ¶
- Variables
- func Bind(name string, body []byte) (map[string]interface{}, error)
- func Create(data map[string]interface{}, nameSchema string) (map[string]interface{}, string, error)
- func CreateBucket(name string)
- func CreateBuckets(folderConfig string)
- func Form(name string) (string, error)
- func GetElementByID(id string, nameSchema string) (map[string]interface{}, error)
- func InitDB()
- func Remove(id, nameSchema string) (map[string]interface{}, error)
- func Replace(data map[string]interface{}, id string, nameSchema string) (map[string]interface{}, error)
- type JSONSchame
- type ListResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//Cluster ...
Cluster *gocb.Cluster
)
Functions ¶
func CreateBuckets ¶
func CreateBuckets(folderConfig string)
func GetElementByID ¶
Types ¶
type JSONSchame ¶
type JSONSchame struct { Schema *string `json:"$schema,omitempty"` ID *string `json:"$id,omitempty"` Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` Type string `json:"type"` Properties *map[string]JSONSchame `json:"properties,omitempty"` Required *[]string `json:"required,omitempty"` ExclusiveMinimum *float64 `json:"exclusiveMinimum,omitempty"` ExclusiveMaximum *float64 `json:"exclusiveMaximum,omitempty"` Minimum *float64 `json:"minimum,omitempty"` Maximum *float64 `json:"maximum,omitempty"` MultipleOf *float64 `json:"multipleOf,omitempty"` MinLength *int `json:"minLength,omitempty"` MaxLength *int `json:"maxLength,omitempty"` UniqueItems *bool `json:"uniqueItems,omitempty"` Format *string `json:"format,omitempty"` Example *string `json:"example,omitempty"` Regex *string `json:"regex,omitempty"` Pattern *string `json:"pattern,omitempty"` Enum *[]interface{} `json:"enum,omitempty"` Const *interface{} `json:"const,omitempty"` Contains *JSONSchame `json:"contains,omitempty"` Items *interface{} `json:"items,omitempty"` AdditionalItems *interface{} `json:"additionalItems,omitempty"` MinItems *int `json:"minItems,omitempty"` MaxItems *int `json:"maxItems,omitempty"` MaxContains *int `json:"maxContains,omitempty"` MinContains *int `json:"minContains,omitempty"` MaxProperties *int `json:"maxProperties,omitempty"` MinProperties *int `json:"minProperties,omitempty"` //no standard Strict *bool `json:"_strict,omitempty"` }
func GetSchema ¶
func GetSchema(name string) (*JSONSchame, error)
type ListResponse ¶
type ListResponse struct { TotalResults int `json:"totalResults,omitempty"` ItemsPerPage int `json:"itemsPerPage,omitempty"` StartIndex int `json:"startIndex,omitempty"` Resources []interface{} `json:"resources,omitempty"` }
func Search ¶
func Search(nameSchema, filter, startIndex, count, sortBy, sortOrder string) (*ListResponse, error)
Click to show internal directories.
Click to hide internal directories.