Documentation ¶
Index ¶
- Constants
- Variables
- func AssignComponentsToTargets(components []model.ComponentSpec, targets map[string]model.TargetState) (map[string]string, error)
- func CatalogHook(context context.Context, baseUrl string, user string, password string, ...) error
- func CollectStringMap(col map[string]string, prefix string) map[string]string
- func ContainsString(names []string, name string) bool
- func CreateInstance(context context.Context, baseUrl string, instance string, user string, ...) error
- func CreateSymphonyDeployment(instance model.InstanceState, solution model.SolutionState, ...) (model.DeploymentSpec, error)
- func CreateSymphonyDeploymentFromTarget(target model.TargetState, namespace string) (model.DeploymentSpec, error)
- func CreateTarget(context context.Context, baseUrl string, target string, user string, ...) error
- func DeleteCatalog(context context.Context, baseUrl string, catalog string, user string, ...) error
- func DeleteInstance(context context.Context, baseUrl string, instance string, user string, ...) error
- func DeleteSolution(context context.Context, baseUrl string, solution string, user string, ...) error
- func DeleteTarget(context context.Context, baseUrl string, target string, user string, ...) error
- func EvaluateDeployment(context utils.EvaluationContext) (model.DeploymentSpec, error)
- func FormatAsString(val interface{}) string
- func FormatObject(obj interface{}, isArray bool, path string, format string) ([]byte, error)
- func GetABatchForSite(context context.Context, baseUrl string, site string, user string, ...) (model.SyncPackage, error)
- func GetActivation(context context.Context, baseUrl string, activation string, user string, ...) (model.ActivationState, error)
- func GetApiClient() (*apiClient, error)
- func GetCampaign(context context.Context, baseUrl string, campaign string, user string, ...) (model.CampaignState, error)
- func GetCatalog(context context.Context, baseUrl string, catalog string, user string, ...) (model.CatalogState, error)
- func GetCatalogs(context context.Context, baseUrl string, user string, password string, ...) ([]model.CatalogState, error)
- func GetCatalogsWithFilter(context context.Context, baseUrl string, user string, password string, ...) ([]model.CatalogState, error)
- func GetInstance(context context.Context, baseUrl string, instance string, user string, ...) (model.InstanceState, error)
- func GetInstances(context context.Context, baseUrl string, user string, password string, ...) ([]model.InstanceState, error)
- func GetInstancesForAllNamespaces(context context.Context, baseUrl string, user string, password string) ([]model.InstanceState, error)
- func GetParentApiClient(baseUrl string) (*apiClient, error)
- func GetSites(context context.Context, baseUrl string, user string, password string) ([]model.SiteState, error)
- func GetSolution(context context.Context, baseUrl string, solution string, user string, ...) (model.SolutionState, error)
- func GetSolutions(context context.Context, baseUrl string, user string, password string, ...) ([]model.SolutionState, error)
- func GetSolutionsForAllNamespaces(context context.Context, baseUrl string, user string, password string) ([]model.SolutionState, error)
- func GetString(col map[string]string, key string) (string, error)
- func GetSummary(context context.Context, baseUrl string, user string, password string, ...) (model.SummaryResult, error)
- func GetSymphonyAPIAddressBase() string
- func GetTarget(context context.Context, baseUrl string, target string, user string, ...) (model.TargetState, error)
- func GetTargets(context context.Context, baseUrl string, user string, password string, ...) ([]model.TargetState, error)
- func GetTargetsForAllNamespaces(context context.Context, baseUrl string, user string, password string) ([]model.TargetState, error)
- func JsonPathQuery(obj interface{}, jsonPath string) (interface{}, error)
- func MatchTargets(instance model.InstanceState, targets []model.TargetState) []model.TargetState
- func MergeCollection(cols ...map[string]string) map[string]string
- func NewApiClient(ctx context.Context, baseUrl string, opts ...ApiClientOption) (*apiClient, error)
- func ParseValue(v string) (interface{}, error)
- func ProjectValue(val string, name string) string
- func PublishActivationEvent(context context.Context, baseUrl string, user string, password string, ...) error
- func QueueJob(context context.Context, baseUrl string, user string, password string, ...) error
- func ReadInt32(col map[string]string, key string, defaultVal int32) int32
- func ReadString(col map[string]string, key string, defaultVal string) string
- func ReadStringFromMapCompat(col map[string]interface{}, key string, defaultVal string) string
- func ReadStringWithOverrides(col1 map[string]string, col2 map[string]string, key string, defaultVal string) string
- func Reconcile(context context.Context, baseUrl string, user string, password string, ...) (model.SummarySpec, error)
- func ReportActivationStatus(context context.Context, baseUrl string, name string, user string, ...) error
- func ReportCatalogs(context context.Context, baseUrl string, user string, password string, ...) error
- func SendVisualizationPacket(context context.Context, baseUrl string, user string, password string, ...) error
- func ShouldUseSATokens() bool
- func ShouldUseUserCreds() bool
- func SyncActivationStatus(context context.Context, baseUrl string, user string, password string, ...) error
- func UpdateSite(context context.Context, baseUrl string, site string, user string, ...) error
- func UpsertCatalog(context context.Context, baseUrl string, catalog string, user string, ...) error
- func UpsertSolution(context context.Context, baseUrl string, solution string, user string, ...) error
- type ApiClient
- type ApiClientOption
- type BinaryNode
- type Dispatcher
- type ExpressionParser
- type FunctionNode
- type IdentifierNode
- type IntNode
- type Node
- type NullNode
- type NumberNode
- type Parser
- type Rule
- type RuleResult
- type Schema
- type SchemaResult
- type SummaryGetter
- type SummarySpecError
- type Token
- type TokenProvider
- type UnaryNode
Constants ¶
View Source
const ( Must = "must" Prefer = "prefer" Reject = "reject" Any = "any" )
Variables ¶
View Source
var (
SymphonyAPIAddressBase = "http://symphony-service:8080/v1alpha2/"
)
Functions ¶
func AssignComponentsToTargets ¶
func AssignComponentsToTargets(components []model.ComponentSpec, targets map[string]model.TargetState) (map[string]string, error)
func CatalogHook ¶
func CollectStringMap ¶
func ContainsString ¶
func CreateInstance ¶
func CreateSymphonyDeployment ¶
func CreateSymphonyDeployment(instance model.InstanceState, solution model.SolutionState, targets []model.TargetState, devices []model.DeviceState, namespace string) (model.DeploymentSpec, error)
func CreateSymphonyDeploymentFromTarget ¶
func CreateSymphonyDeploymentFromTarget(target model.TargetState, namespace string) (model.DeploymentSpec, error)
func CreateTarget ¶
func DeleteCatalog ¶
func DeleteInstance ¶
func DeleteSolution ¶
func DeleteTarget ¶
func EvaluateDeployment ¶
func EvaluateDeployment(context utils.EvaluationContext) (model.DeploymentSpec, error)
func FormatAsString ¶
func FormatAsString(val interface{}) string
func FormatObject ¶
func GetABatchForSite ¶
func GetActivation ¶
func GetApiClient ¶
func GetApiClient() (*apiClient, error)
func GetCampaign ¶
func GetCatalog ¶
func GetCatalogs ¶
func GetCatalogsWithFilter ¶
func GetInstance ¶
func GetInstances ¶
func GetParentApiClient ¶
func GetSolution ¶
func GetSolutions ¶
func GetSummary ¶
func GetSymphonyAPIAddressBase ¶
func GetSymphonyAPIAddressBase() string
func GetTargets ¶
func JsonPathQuery ¶
func MatchTargets ¶
func MatchTargets(instance model.InstanceState, targets []model.TargetState) []model.TargetState
func NewApiClient ¶
func NewApiClient(ctx context.Context, baseUrl string, opts ...ApiClientOption) (*apiClient, error)
func ProjectValue ¶
TODO: This should not be used anymore
func PublishActivationEvent ¶
func ReadStringFromMapCompat ¶
func ReadStringWithOverrides ¶
func ReportActivationStatus ¶
func ReportCatalogs ¶
func SendVisualizationPacket ¶
func ShouldUseSATokens ¶
func ShouldUseSATokens() bool
func ShouldUseUserCreds ¶
func ShouldUseUserCreds() bool
func SyncActivationStatus ¶
func UpdateSite ¶
func UpsertCatalog ¶
Types ¶
type ApiClient ¶
type ApiClient interface { SummaryGetter Dispatcher GetInstancesForAllNamespaces(ctx context.Context, user string, password string) ([]model.InstanceState, error) GetInstances(ctx context.Context, namespace string, user string, password string) ([]model.InstanceState, error) GetInstance(ctx context.Context, instance string, namespace string, user string, password string) (model.InstanceState, error) CreateInstance(ctx context.Context, instance string, payload []byte, namespace string, user string, password string) error DeleteInstance(ctx context.Context, instance string, namespace string, user string, password string) error DeleteTarget(ctx context.Context, target string, namespace string, user string, password string) error GetSolutions(ctx context.Context, namespace string, user string, password string) ([]model.SolutionState, error) GetSolution(ctx context.Context, solution string, namespace string, user string, password string) (model.SolutionState, error) CreateSolution(ctx context.Context, solution string, payload []byte, namespace string, user string, password string) error DeleteSolution(ctx context.Context, solution string, namespace string, user string, password string) error GetTargetsForAllNamespaces(ctx context.Context, user string, password string) ([]model.TargetState, error) GetTarget(ctx context.Context, target string, namespace string, user string, password string) (model.TargetState, error) GetTargets(ctx context.Context, namespace string, user string, password string) ([]model.TargetState, error) CreateTarget(ctx context.Context, target string, payload []byte, namespace string, user string, password string) error Reconcile(ctx context.Context, deployment model.DeploymentSpec, isDelete bool, namespace string, user string, password string) (model.SummarySpec, error) CatalogHook(ctx context.Context, payload []byte, user string, password string) error PublishActivationEvent(ctx context.Context, event v1alpha2.ActivationData, user string, password string) error GetCatalog(ctx context.Context, catalog string, namespace string, user string, password string) (model.CatalogState, error) UpsertCatalog(ctx context.Context, catalog string, payload []byte, user string, password string) error DeleteCatalog(ctx context.Context, catalog string, user string, password string) error UpsertSolution(ctx context.Context, solution string, payload []byte, namespace string, user string, password string) error GetSites(ctx context.Context, user string, password string) ([]model.SiteState, error) GetCatalogs(ctx context.Context, namespace string, user string, password string) ([]model.CatalogState, error) GetCatalogsWithFilter(ctx context.Context, namespace string, filterType string, filterValue string, user string, password string) ([]model.CatalogState, error) UpdateSite(ctx context.Context, site string, payload []byte, user string, password string) error GetABatchForSite(ctx context.Context, site string, user string, password string) (model.SyncPackage, error) SyncActivationStatus(ctx context.Context, status model.ActivationStatus, user string, password string) error SendVisualizationPacket(ctx context.Context, payload []byte, user string, password string) error ReportCatalogs(ctx context.Context, instance string, components []model.ComponentSpec, user string, password string) error }
type ApiClientOption ¶
type ApiClientOption func(*apiClient)
func WithCertAuth ¶
func WithCertAuth(caCertPath string) ApiClientOption
func WithServiceAccountToken ¶
func WithServiceAccountToken() ApiClientOption
func WithUserPassword ¶
func WithUserPassword(ctx context.Context, user string, password string) ApiClientOption
type BinaryNode ¶
func (*BinaryNode) Eval ¶
func (n *BinaryNode) Eval(context utils.EvaluationContext) (interface{}, error)
type Dispatcher ¶
type ExpressionParser ¶
type ExpressionParser struct {
// contains filtered or unexported fields
}
func (*ExpressionParser) Eval ¶
func (p *ExpressionParser) Eval(context utils.EvaluationContext) (interface{}, error)
type FunctionNode ¶
func (*FunctionNode) Eval ¶
func (n *FunctionNode) Eval(context utils.EvaluationContext) (interface{}, error)
type IdentifierNode ¶
type IdentifierNode struct {
Value string
}
func (*IdentifierNode) Eval ¶
func (n *IdentifierNode) Eval(context utils.EvaluationContext) (interface{}, error)
type Node ¶
type Node interface {
Eval(context utils.EvaluationContext) (interface{}, error)
}
type NumberNode ¶
type NumberNode struct {
Value float64
}
func (*NumberNode) Eval ¶
func (n *NumberNode) Eval(context utils.EvaluationContext) (interface{}, error)
type RuleResult ¶
type Schema ¶
func (*Schema) CheckProperties ¶
func (s *Schema) CheckProperties(properties map[string]interface{}, evaluationContext *coa_utils.EvaluationContext) (SchemaResult, error)
type SchemaResult ¶
type SchemaResult struct { Valid bool `json:"valid"` Errors map[string]RuleResult `json:"errors,omitempty"` }
type SummaryGetter ¶
type SummarySpecError ¶
We shouldn't use specific error types SummarySpecError represents an error that includes a SummarySpec in its message field.
func (*SummarySpecError) Error ¶
func (e *SummarySpecError) Error() string
type TokenProvider ¶
Click to show internal directories.
Click to hide internal directories.