Documentation ¶
Index ¶
- Constants
- Variables
- func Bulk(c *gin.Context)
- func ContainsSchemaExtension(slice []SchemaExtension, item string) bool
- func ContainsString(slice []string, item string) bool
- func ContainsStringInArrayInterfase(slice []interface{}, item string) bool
- func Create(resource string) func(c *gin.Context)
- func CreateBucket(name string)
- func Delete(resource string) func(c *gin.Context)
- func DiscoveryResourceTypes(c *gin.Context)
- func DiscoverySchemas(c *gin.Context)
- func DiscoveryServiceProviderConfig(c *gin.Context)
- func InitDB()
- func Read(resource string) func(c *gin.Context)
- func ReadResourceType(folderConfig string, r *gin.Engine)
- func Replace(resource string) func(c *gin.Context)
- func Search(resource string) func(c *gin.Context)
- func Update(resource string) func(c *gin.Context)
- func ValidateFieldSchemas(c *gin.Context, element map[string]interface{}, resourceType ResoruceType) (bool, []string)
- func ValidateReadRole(roles []string, resourceType ResoruceType, element map[string]interface{}) map[string]interface{}
- func ValidateSchemas(c *gin.Context, element map[string]interface{}, schemaNameCore string, ...) (bool, map[string]interface{})
- type Attribute
- type ConfigBucket
- type Error
- type ListResponse
- type Meta
- type Operation
- type Patch
- type ResoruceType
- type Resource
- type Schema
- type SchemaExtension
Constants ¶
const ( // FolderSchema is .. FolderSchema = "/schemas/" // FolderResoruceType is .. FolderResoruceType = "/resourceType/" PREFIX = "/scim/v2" )
Variables ¶
var ( // Resources ... Resources map[string]ResoruceType // Schemas ... Schemas map[string]Schema )
var ( //Cluster ... Cluster *gocb.Cluster FolderBucketSetting = "config/bucketSettings/" )
Functions ¶
func ContainsSchemaExtension ¶
func ContainsSchemaExtension(slice []SchemaExtension, item string) bool
ContainsSchemaExtension is
func ContainsStringInArrayInterfase ¶
ContainsStringInArrayInterfase is
func Create ¶
Create is POST https://example.com/{v}/{resource}
func Delete ¶
Delete is DELETE https://example.com/{v}/{resource}/{id}
func DiscoveryResourceTypes ¶
DiscoveryResourceTypes is An endpoint used to discover the types of resources available.
func DiscoverySchemas ¶
DiscoverySchemas is Introspect resources and attribute extensions.
func DiscoveryServiceProviderConfig ¶
DiscoveryServiceProviderConfig is Specification compliance, authentication schemes, data models.
func Read ¶
Read is GET https://example.com/{v}/{resource}/{id}
func ReadResourceType ¶
ReadResourceType read all file in resourceType
func Replace ¶
Replace is PUT https://example.com/{v}/{resource}/{id}
func Search ¶
Search is GET https://example.com/{v}/{resource}?filter={attribute}{op}{value}&sortBy={attributeName}&sortOrder={ascending|descending}
func Update ¶
Update is PATCH https://example.com/{v}/{resource}/{id}
func ValidateFieldSchemas ¶
func ValidateFieldSchemas(c *gin.Context, element map[string]interface{}, resourceType ResoruceType) (bool, []string)
ValidateFieldSchemas is ..
func ValidateReadRole ¶
func ValidateReadRole(roles []string, resourceType ResoruceType, element map[string]interface{}) map[string]interface{}
func ValidateSchemas ¶
func ValidateSchemas(c *gin.Context, element map[string]interface{}, schemaNameCore string, schemas []SchemaExtension) (bool, map[string]interface{})
ValidateSchemas is
Types ¶
type Attribute ¶
type Attribute struct { Name string `json:"name"` Type string `json:"type"` MultiValued bool `json:"multiValued"` Description string `json:"description"` Required bool `json:"required"` CaseExact bool `json:"caseExact"` Mutability string `json:"mutability"` Returned string `json:"returned"` Uniqueness string `json:"uniqueness"` Writer *[]string `json:"$writer"` Read *[]string `json:"$reader"` SubAttributes []Attribute `json:"subAttributes"` }
Attribute is of SCIM
func GetAttribute ¶
type ConfigBucket ¶
type ConfigBucket struct { FlushEnabled *bool `json:"flush_enabled"` ReplicaIndexDisabled *bool `json:"replica_index_disabled"` RAMQuotaMb *uint64 `json:"ram_quota_mb"` NumReplicas *uint32 `json:"num_replicas"` BucketType *string `json:"bucket_type"` CompressionMode *string `json:"compression_mode"` MaxExpiry *string `json:"MaxExpiry"` EvictionPolicy *string `json:"EvictionPolicy"` ConflictResolutionType *string `json:"conflict_resolution_type"` }
type Error ¶
type Error struct { Schemas []string `json:"schemas"` Detail string `json:"detail"` Status string `json:"status"` }
Error is ..
type ListResponse ¶
type ListResponse struct { Schemas []string `json:"schemas"` TotalResults int `json:"totalResults,omitempty"` ItemsPerPage int `json:"itemsPerPage,omitempty"` StartIndex int `json:"startIndex,omitempty"` Resources []interface{} `json:"Resources,omitempty"` }
ListResponse is of SCIM
type Meta ¶
type Meta struct { ResourceType string `json:"resourceType"` Created string `json:"created"` LastModified string `json:"lastModified"` Version string `json:"version"` Location string `json:"location"` }
Meta is of SCIM
type Operation ¶
type Operation struct { Op string `json:"op"` // "add", "remove", or "replace" Path string `json:"path"` Value interface{} `json:"value"` }
Operation ...
type Patch ¶
Patch is 3.5.2. Modifying with PATCH HTTP PATCH is an OPTIONAL server function that enables clients to update one or more attributes of a SCIM resource using a sequence of operations to "add", "remove", or "replace" values. Clients may discover service provider support for PATCH by querying the service provider configuration (see Section 4).
type ResoruceType ¶
type ResoruceType struct { Schemas []string `json:"schemas"` ID string `json:"id"` Name string `json:"name"` Endpoint string `json:"endpoint"` Description string `json:"description"` Schema string `json:"schema"` SchemaExtensions []SchemaExtension `json:"schemaExtensions"` Meta Meta `json:"meta"` }
ResoruceType is of SCIM
type Schema ¶
type Schema struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Attributes []Attribute `json:"attributes"` Meta Meta `json:"meta"` }
Schema is of SCIM
type SchemaExtension ¶
SchemaExtension is of SCIM