Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Operator ¶
type Operator interface {
Direct(ctx context.Context, scopedMap map[string]interface{}, scopedAttr string, value interface{}) bool
ByValueExpressionForItem(ctx context.Context, scopedMaps []map[string]interface{}, expr filter.Expression, value interface{}) ([]map[string]interface{}, bool)
ByValueExpressionForAttribute(ctx context.Context, scopedMaps []map[string]interface{}, expr filter.Expression, subAttr string, value interface{}) ([]map[string]interface{}, bool)
}
Operator は Patch Operation の各操作のドメインとなるインターフェースです。 Direct は map とその map 内で更新対象となる属性と更新後の値を受け取って更新後のmapと変更有無を返却します この関数のみ、pathが未指定の場合でも利用されます ByValueExpressionForItem は 対象の属性が、MultiValuedComplexAttribute で path にて valFilter が指定されているときにそれを受けとって更新後のスライスと変更有無を返却します。 ByValueExpressionForAttribute は 対象の属性が、MultiValuedComplexAttribute で path にて valFilter と subAttr が指定されているときにそれを受けとって更新後のスライスと変更有無を返却します。
type Patcher ¶
type Patcher struct {
// contains filtered or unexported fields
}
func NewPatcher ¶
NewPatcher は Patcher の実態を取得します。
func (*Patcher) Apply ¶
func (p *Patcher) Apply(ctx context.Context, op scim.PatchOperation, data map[string]interface{}) (map[string]interface{}, bool, error)
Apply は RFC7644 3.5.2. Modifying with PATCH の実装です。 data に op が適用された ResourceAttributes と実際に適用されたかどうかの真偽値を返却します。 see. https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.2
type PatcherLogger ¶
type PatcherLogger interface {
Error(args ...interface{})
Debug(args ...interface{})
}
type PatcherOpts ¶
PatcherOpts を利用することで Patcherが利用する各操作の Operator を上書きすることができます。 指定しない場合はパッケージデフォルトで実装されている Operator が利用されます。