Versions in this module Expand all Collapse all v1 v1.1.0 Dec 17, 2019 v1.0.1 Mar 1, 2018 Changes in this version + const Add + const Always + const And + const BulkOp + const BulkRequestUrn + const BulkResponseUrn + const Co + const ConstantOperand + const CreateGroup + const CreateUser + const Default + const DeleteGroup + const DeleteUser + const Eq + const ErrorUrn + const Ew + const External + const Ge + const GetAllResourceType + const GetAllSchema + const GetGroupById + const GetSPConfig + const GetSchemaById + const GetUserById + const Global + const GroupResourceType + const GroupUrn + const Gt + const Immutable + const Le + const ListResponseUrn + const LogicalOperator + const Lt + const Ne + const Never + const None + const Not + const Or + const Parenthesis + const PatchGroup + const PatchOpUrn + const PatchUser + const PathOperand + const Pr + const QueryGroup + const QueryUser + const ReadOnly + const ReadWrite + const RelationalOperator + const Remove + const Replace + const ReplaceGroup + const ReplaceUser + const Request + const ResourceTypeResourceType + const ResourceTypeUrn + const RootQuery + const SPConfigUrn + const SchemaResourceType + const SchemaUrn + const SearchUrn + const Server + const ServiceProviderConfigResourceType + const Sw + const TypeBinary + const TypeBoolean + const TypeComplex + const TypeDateTime + const TypeDecimal + const TypeInteger + const TypeReference + const TypeString + const Uri + const UserResourceType + const UserUrn + const WriteOnly + func ApplyPatch(patch Patch, subj *Resource, sch *Schema, ctx context.Context) (err error) + func CompositeSearchFunc(repositories ...Repository) func(payload SearchRequest) (*ListResponse, error) + func CorrectCase(subj *Resource, sch *Schema, ctx context.Context) (err error) + func MarshalJSON(v interface{}, sch *Schema, attributes []string, excludedAttributes []string) ([]byte, error) + func NewQueue(cap int) *queue + func NewQueueWithoutLimit() *queue + func NewStack(cap int) *stack + func NewStackWithoutLimit() *stack + func ValidateMutability(subj *Resource, ref *Resource, sch *Schema, ctx context.Context) (err error) + func ValidateRequired(subj *Resource, sch *Schema, ctx context.Context) (err error) + func ValidateType(subj *Resource, sch *Schema, ctx context.Context) (err error) + func ValidateUniqueness(subj *Resource, sch *Schema, repo Repository, ctx context.Context) (err error) + type Assist struct + ArrayIndexKey []string + FullPath string + JSONName string + Path string + type Attribute struct + Assist *Assist + CanonicalValues []string + CaseExact bool + Description string + MultiValued bool + Mutability string + Name string + ReferenceTypes []string + Required bool + Returned string + SubAttributes []*Attribute + Type string + Uniqueness string + func (a *Attribute) Assigned(v reflect.Value) bool + func (a *Attribute) Clone() *Attribute + func (a *Attribute) EqualsToPath(p Path) bool + func (a *Attribute) ExpectsBinary() bool + func (a *Attribute) ExpectsBool() bool + func (a *Attribute) ExpectsComplex() bool + func (a *Attribute) ExpectsComplexArray() bool + func (a *Attribute) ExpectsFloat() bool + func (a *Attribute) ExpectsInteger() bool + func (a *Attribute) ExpectsString() bool + func (a *Attribute) ExpectsStringArray() bool + func (a *Attribute) GetAttribute(p Path, recursive bool) *Attribute + func (a *Attribute) MarshalJSON() ([]byte, error) + func (a *Attribute) TypeExpectation() string + type AttributeSource interface + GetAttribute func(p Path, recursive bool) *Attribute + type BulkReq struct + FailOnErrors int + Operations []BulkReqOp + Schemas []string + func (br BulkReq) Validate(ps PropertySource) error + type BulkReqOp struct + Data json.RawMessage + Path string + type BulkResp struct + Operations []*BulkRespOp + Schemas []string + type BulkRespOp struct + Location string + Response json.RawMessage + Status int + func (bro BulkRespOp) Populate(origReq BulkReqOp, resp WebResponse) + type Complex map[string]interface + func (c Complex) Evaluate(filter FilterNode, guide AttributeSource) bool + func (c Complex) Get(p Path, guide AttributeSource) chan interface{} + func (c Complex) Set(p Path, value interface{}, guide AttributeSource) error + type DataProvider interface + GetData func() Complex + GetId func() string + type DuplicateError struct + Path string + Value interface{} + func (e DuplicateError) Error() string + type ErrorFactory interface + Duplicate func(path string, value interface{}) error + InvalidFilter func(filter, detail string) error + InvalidParam func(name, expect, got string) error + InvalidPath func(path, detail string) error + InvalidType func(path, expect, got string) error + MissingRequiredProperty func(path string) error + MutabilityViolation func(path string) error + NoAttribute func(path string) error + ResourceNotFound func(id, version string) error + Text func(template string, args ...interface{}) error + var Error ErrorFactory + type FilterNode interface + CorrectCase func(guide AttributeSource) + Data func() interface{} + Left func() FilterNode + Right func() FilterNode + Type func() FilterNodeType + func NewFilter(text string) (FilterNode, error) + type FilterNodeType int + type InvalidFilterError struct + Detail string + Filter string + func (e InvalidFilterError) Error() string + type InvalidParamError struct + Expect string + Got string + Name string + func (e *InvalidParamError) Error() string + type InvalidPathError struct + Detail string + Path string + func (e InvalidPathError) Error() string + type InvalidTypeError struct + Expect string + Got string + Path string + func (e *InvalidTypeError) Error() string + type ListResponse struct + ItemsPerPage int + Resources []DataProvider + Schemas []string + StartIndex int + TotalResults int + type Logger interface + Debug func(template string, args ...interface{}) + Error func(template string, args ...interface{}) + Info func(template string, args ...interface{}) + type MissingRequiredPropertyError struct + Path string + func (e *MissingRequiredPropertyError) Error() string + type Modification struct + Ops []Patch + Schemas []string + func (m Modification) Validate() error + type MultiValued []interface + func (c MultiValued) Add(value ...interface{}) MultiValued + func (c MultiValued) Filter(root FilterNode, guide AttributeSource) chan interface{} + func (c MultiValued) Get(index int) interface{} + func (c MultiValued) Len() int + func (c MultiValued) Remove(index int) MultiValued + func (c MultiValued) Set(index int, value interface{}) + type MutabilityViolationError struct + Path string + func (e *MutabilityViolationError) Error() string + type NoAttributeError struct + Path string + func (e *NoAttributeError) Error() string + type Number string + func (n Number) Float64() (float64, error) + func (n Number) String() string + type Patch struct + Op string + Path string + Value interface{} + type Path interface + Base func() string + CollectValue func() string + CorrectCase func(AttributeSource, bool) + FilterRoot func() FilterNode + Next func() Path + SeparateAtLast func() (Path, Path) + Value func() string + func NewPath(text string) (Path, error) + type PropertySource interface + Get func(key string) interface{} + GetBool func(key string) bool + GetInt func(key string) int + GetString func(key string) string + type Queue interface + Capacity func() int + Clone func() Queue + Offer func(item interface{}) + Peek func() interface{} + Poll func() interface{} + Size func() int + type ReadOnlyAssignment interface + AssignValue func(r *Resource, ctx context.Context) error + func NewGroupAssignment(groupRepository Repository) ReadOnlyAssignment + func NewIdAssignment() ReadOnlyAssignment + func NewMetaAssignment(properties PropertySource, resourceType string) ReadOnlyAssignment + type Repository interface + Count func(query string) (int, error) + Create func(provider DataProvider) error + Delete func(id, version string) error + Get func(id, version string) (DataProvider, error) + GetAll func() ([]Complex, error) + Search func(payload SearchRequest) (*ListResponse, error) + Update func(id, version string, provider DataProvider) error + func NewMapRepository(initialData map[string]DataProvider) Repository + type RequestId struct + type RequestTimestamp struct + type RequestType struct + type Resource struct + func ParseResource(filePath string) (*Resource, string, error) + func (r *Resource) GetData() Complex + func (r *Resource) GetId() string + type ResourceId struct + type ResourceNotFoundError struct + Id string + Version string + func (e ResourceNotFoundError) Error() string + type Schema struct + Attributes []*Attribute + Description string + Id string + Name string + Schemas []string + func ParseSchema(filePath string) (*Schema, string, error) + func (s *Schema) GetAttribute(p Path, recursive bool) *Attribute + func (s *Schema) ToAttribute() *Attribute + type SearchRequest struct + Attributes []string + Count int + ExcludedAttributes []string + Filter string + Schemas []string + SortBy string + SortOrder string + StartIndex int + func (sr SearchRequest) Ascending() bool + func (sr SearchRequest) Validate(guide AttributeSource) error + type Stack interface + Capacity func() int + Clone func() Stack + Peek func() interface{} + Pop func() interface{} + Push func(item interface{}) + Size func() int + type WebRequest interface + Body func() ([]byte, error) + Header func(name string) string + Method func() string + Param func(name string) string + Target func() string + type WebResponse interface + GetBody func() []byte + GetHeader func(name string) string + GetStatus func() int