Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseRepositoryConfig string
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RepositoryRoot string `json:"repository_root"` Namespace string `json:"namespace"` OutputDirectory string `json:"output_dir"` }
Config stores information about the repository location
type Repository ¶
Repository is a group of schemas
func GetRepository ¶
func GetRepository() (*Repository, error)
GetRepository returns the Repository described by the repository.cue file in the current directory
func NewRepository ¶
func NewRepository(namespace, output, root string) (*Repository, error)
NewRepository creates a new repository root and writes the metadata information
func (*Repository) AddSchema ¶
func (r *Repository) AddSchema(name string) error
AddSchema creates a new directory for a schema and creates the first version of the schema.
func (*Repository) AddVersion ¶
func (r *Repository) AddVersion(schema string) error
AddVersion creates a new version for the specified schema
func (*Repository) Build ¶
func (r *Repository) Build() error
Build serializes the Repository object into a json file in the `Output` directory.
Click to show internal directories.
Click to hide internal directories.