Nothing Special   »   [go: up one dir, main page]

Skip to content
/ ipso Public

IPSO objects and resources management

License

Notifications You must be signed in to change notification settings

aliakseiz/ipso

Repository files navigation

IPSO registry

License Godoc ReportCard

What is IPSO: https://omaspecworks.org/develop-with-oma-specworks/ipso-smart-objects/


Functionality

  • Import registry from OMA API
  • Export registry to YAML-file
  • Import registry from file
  • Compare two registries
  • Find objects and resources by ID and version
  • Find resources by object ID and resource ID
  • Find resources by OIR string i.e. "3303/0/5700"
  • Sanitize objects and resources text fields

Usage examples

Initialize a registry from OMA API:

reg, err := registry.New(ipso.DefaultConfiguration())

Export initialized registry to YAML file:

err := reg.Export("registry.yaml")

Import a previously exported registry from YAML file:

err := reg.Import("registry.yaml")

Create a registry with custom configuration:

cfg := ipso.Configuration{
    InitOnNew:      false,
    SkipInitErrors: false,
    Sanitize: false,
}

reg, err := ipso.New(cfg)

Compare two registries:

comp := reg1.Compare(reg2.GetRegistry())

Remove unwanted strings from objects and resources description:

reg.Sanitize(ipso.DefaultSanitizer())

Linter

go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.38.0
golangci-lint run --enable-all

License

MIT