Documentation ¶
Index ¶
- Constants
- func NewJQDictParser(dict map[string]string) map[string]JQFieldParser
- type JQArrayParser
- type JQDictParser
- type JQFieldParser
- type JQRepositoryParser
- type JQServiceParser
- type JQTagsParser
- type JQToolsParser
- type RepositoryDTO
- type ServiceRegistration
- type ServiceRegistrationConfig
- type TagRegistrationConfig
Constants ¶
View Source
const ReleaseVersion = "v2024.4.26"
Variables ¶
This section is empty.
Functions ¶
func NewJQDictParser ¶ added in v2024.2.26
func NewJQDictParser(dict map[string]string) map[string]JQFieldParser
Types ¶
type JQArrayParser ¶
type JQArrayParser struct {
// contains filtered or unexported fields
}
func NewJQArrayParser ¶
func NewJQArrayParser(expressions []string) *JQArrayParser
type JQDictParser ¶ added in v2024.2.26
type JQDictParser map[string]JQFieldParser
func (JQDictParser) Run ¶ added in v2024.2.26
func (p JQDictParser) Run(data string) ([]opslevel.PropertyInput, error)
type JQFieldParser ¶
type JQFieldParser struct {
// contains filtered or unexported fields
}
func NewJQFieldParser ¶
func NewJQFieldParser(expression string) *JQFieldParser
type JQRepositoryParser ¶
type JQRepositoryParser struct {
// contains filtered or unexported fields
}
func NewJQRepositoryParser ¶
func NewJQRepositoryParser(expressions []string) *JQRepositoryParser
func (*JQRepositoryParser) Run ¶
func (p *JQRepositoryParser) Run(data string) ([]opslevel.ServiceRepositoryCreateInput, error)
type JQServiceParser ¶
type JQServiceParser struct {
// contains filtered or unexported fields
}
func NewJQServiceParser ¶
func NewJQServiceParser(cfg ServiceRegistrationConfig) *JQServiceParser
func (*JQServiceParser) Run ¶
func (p *JQServiceParser) Run(json string) (*ServiceRegistration, error)
type JQTagsParser ¶
type JQTagsParser struct {
// contains filtered or unexported fields
}
func NewJQTagsParser ¶
func NewJQTagsParser(cfg TagRegistrationConfig) *JQTagsParser
func (*JQTagsParser) Run ¶
func (p *JQTagsParser) Run(data string) ([]opslevel.TagInput, []opslevel.TagInput, error)
type JQToolsParser ¶
type JQToolsParser struct {
// contains filtered or unexported fields
}
func NewJQToolsParser ¶
func NewJQToolsParser(expressions []string) *JQToolsParser
func (*JQToolsParser) Run ¶
func (p *JQToolsParser) Run(data string) ([]opslevel.ToolCreateInput, error)
type RepositoryDTO ¶
func (*RepositoryDTO) Convert ¶
func (r *RepositoryDTO) Convert() opslevel.ServiceRepositoryCreateInput
type ServiceRegistration ¶
type ServiceRegistration struct { Aliases []string `json:"aliases,omitempty"` Description string `json:"description,omitempty"` Framework string `json:"framework,omitempty"` Language string `json:"language,omitempty"` Lifecycle string `json:"lifecycle,omitempty"` Name string `json:"name,omitempty"` Owner string `json:"owner,omitempty"` Product string `json:"product,omitempty"` Properties []opslevel.PropertyInput `json:"properties,omitempty"` Repositories []opslevel.ServiceRepositoryCreateInput `json:"repositories,omitempty"` // This is a concrete class so fields are validated during `service preview` System string `json:"system,omitempty"` TagAssigns []opslevel.TagInput `json:"tagAssigns,omitempty"` TagCreates []opslevel.TagInput `json:"tagCreates,omitempty"` Tier string `json:"tier,omitempty"` Tools []opslevel.ToolCreateInput `json:"tools,omitempty"` // This is a concrete class so fields are validated during `service preview` }
ServiceRegistration represents the parsed json data from a ServiceRegistrationConfig
type ServiceRegistrationConfig ¶
type ServiceRegistrationConfig struct { Aliases []string `json:"aliases" yaml:"aliases"` // JQ expressions that return a single string or a []string Description string `json:"description" yaml:"description"` Framework string `json:"framework" yaml:"framework"` Language string `json:"language" yaml:"language"` Lifecycle string `json:"lifecycle" yaml:"lifecycle"` Name string `json:"name" yaml:"name"` Owner string `json:"owner" yaml:"owner"` Product string `json:"product" yaml:"product"` Properties map[string]string `json:"properties" yaml:"properties"` Repositories []string `json:"repositories" yaml:"repositories"` // JQ expressions that return a single string or []string or map[string]string or a []map[string]string System string `json:"system" yaml:"system"` Tags TagRegistrationConfig `json:"tags" yaml:"tags"` Tier string `json:"tier" yaml:"tier"` Tools []string `json:"tools" yaml:"tools"` // JQ expressions that return a single map[string]string or a []map[string]string }
ServiceRegistrationConfig represents the jq expressions configuration that can turn json data into a ServiceRegistration
func NewServiceRegistrationConfig ¶
func NewServiceRegistrationConfig(data string) (*ServiceRegistrationConfig, error)
type TagRegistrationConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.