package
0.200.1
Repository: https://github.com/invopop/gobl.git
Documentation: pkg.go.dev

# Functions

Extract attempts to Unmarshal the provided JSON document in order to extract the payload's Schema ID.
Insert adds the provided schema ID to the JSON data provided.
List of known schema IDs.
Lookup finds the objects schema ID, if set.
NewObject instantiates an Object wrapper around the provided payload.
Register adds a new link between a schema ID and object to the global schema registry.
RegisterIn will determine the anchor and add it to the base schema before adding to the global registry.
ToSnakeCase converts the provided string into snake case using dashes.
Type provides the type from a matching registered schema.
Types provides a complete map of types to schema IDs that have been registered.

# Constants

BaseURL is the base URL for all GOBL schemas.
ErrUnknownSchema is returned when the schema has not been registered.
GOBL stores the base schema ID for GOBL, including current schema version.
Recommended defines the constant used in JSON Schema extensions to define a list of recommended but not required fields.
UnknownID is provided when the schema has not been registered.
Version of the current version of the schema.

# Structs

Object helps handle json objects that must contain a schema to correctly identify the contents and ensuring that a `$schema` property is added automatically when marshalling back into JSON.

# Interfaces

Calculable defines the methods expected of a document payload that contains a `Calculate` method to be used to perform any additional calculations.
Correctable defines the expected interface of a document that can be corrected.
Identifiable defines the methods expected of a document payload that contains a UUID.
Replicable defines the methods expected of a document payload that can be replicated.

# Type aliases

Error is used to define schema errors.
ID contains the official schema URL.
Option is a generic single function intended to be used for handling options to method calls.