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 (pkg *Package) DumpCache() error
- func (pkg *Package) GetDictionaries() (Dictionaries, error)
- func (pkg *Package) Initialize() error
- func (pkg *Package) Parse() error
- func (pkg *Package) ParseWithCache() (*collector.CtiRegistry, error)
- func (pkg *Package) Read() error
- func (pkg *Package) SaveIndex() error
- func (pkg *Package) SaveIndexLock() error
- func (pkg *Package) Sync() error
- func (pkg *Package) Validate() error
- func (pkg *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 (
DependencyDirName = ".dep"
)
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(baseDir 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 (pkg *Package) GetDictionaries() (Dictionaries, error)
func (*Package) Initialize ¶
func (*Package) ParseWithCache ¶ added in v0.22.0
func (pkg *Package) ParseWithCache() (*collector.CtiRegistry, error)
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.