Documentation ¶
Index ¶
- Constants
- func ValidateID(id string) error
- type Asset
- type Dictionaries
- type Dictionary
- type Entity
- type Entry
- type Field
- type Index
- func (idx *Index) Check() error
- func (idx *Index) Clone() *Index
- func (idx *Index) GenerateIndexRaml(includeExamples bool) string
- func (idx *Index) GetAssets() []string
- func (idx *Index) GetEntities() ([]Entity, error)
- func (idx *Index) PutSerialized(fName string)
- func (idx *Index) Save(baseDir string) error
- func (idx *Index) ToBytes() []byte
- type IndexLock
- type Info
- type InitializeOption
- type LangCode
- type Package
- func (b *Package) DumpCache() error
- func (b *Package) GetDictionaries() (Dictionaries, error)
- func (b *Package) Initialize() error
- func (b *Package) Parse() error
- func (b *Package) Read() error
- func (b *Package) SaveIndex() error
- func (b *Package) SaveIndexLock() error
- func (b *Package) Sync() error
- func (b *Package) ValidateRamlxSpec() error
- type SourceInfo
Constants ¶
View Source
const ( IndexFileName = "index.json" RAMLExt = ".raml" )
View Source
const ( IndexLockFileName = "index-lock.json" IndexLockVersion = "v1" )
View Source
const (
MetadataCacheFile = ".cache.json"
)
View Source
const (
RamlxDirName = ".ramlx"
)
Variables ¶
This section is empty.
Functions ¶
func ValidateID ¶
Types ¶
type Dictionaries ¶
type Dictionaries struct {
Dictionaries Dictionary `json:"dictionaries"`
}
type Dictionary ¶
type Index ¶
type Index struct { PackageID string `json:"package_id"` RamlxVersion string `json:"ramlx_version"` Apis []string `json:"apis,omitempty"` Entities []string `json:"entities,omitempty"` Assets []string `json:"assets,omitempty"` Dictionaries []string `json:"dictionaries,omitempty"` Depends map[string]string `json:"depends,omitempty"` Examples []string `json:"examples,omitempty"` AdditionalProperties interface{} `json:"additional_properties,omitempty"` Serialized []string `json:"serialized,omitempty"` }
func ReadIndexFile ¶
func (*Index) GenerateIndexRaml ¶
func (*Index) GetEntities ¶
func (*Index) PutSerialized ¶
type IndexLock ¶
type IndexLock struct { Version string `json:"version"` // Reverse map: key - package id, value - source DependentPackages map[string]string `json:"depends"` // Direct map: key - source, value - Info SourceInfo map[string]Info `json:"dependsInfo"` }
func ReadIndexLock ¶
type InitializeOption ¶
func WithEntities ¶
func WithEntities(entities []string) InitializeOption
func WithID ¶
func WithID(id string) InitializeOption
func WithRamlxVersion ¶
func WithRamlxVersion(version string) InitializeOption
type Package ¶
type Package struct { Index *Index IndexLock *IndexLock Registry *collector.CtiRegistry BaseDir string }
func New ¶
func New(path string, options ...InitializeOption) (*Package, error)
New creates a new package from the specified path. If the path is empty, the current working directory is used.
func (*Package) GetDictionaries ¶
func (b *Package) GetDictionaries() (Dictionaries, error)
func (*Package) Initialize ¶
func (*Package) SaveIndexLock ¶
func (*Package) ValidateRamlxSpec ¶
type SourceInfo ¶
type SourceInfo struct {
Source string `json:"source"`
}
Click to show internal directories.
Click to hide internal directories.