istio: Index | Files | Directories

package schema

import ""


Package Files

kindmapping.go schema.go

type DirectTransformSettings Uses

type DirectTransformSettings struct {
    // contains filtered or unexported fields

DirectTransformSettings configuration

func (*DirectTransformSettings) Mapping Uses

func (d *DirectTransformSettings) Mapping() map[collection.Name]collection.Name

Mapping from source to destination

func (*DirectTransformSettings) Type Uses

func (d *DirectTransformSettings) Type() string

Type implements TransformSettings

type KubeResource Uses

type KubeResource struct {
    Collection    collection.Spec
    Group         string
    Version       string
    Kind          string
    Plural        string
    Disabled      bool
    ClusterScoped bool

KubeResource metadata for a Kubernetes KubeResource.

func (KubeResource) CanonicalResourceName Uses

func (i KubeResource) CanonicalResourceName() string

CanonicalResourceName of the resource.

type KubeResources Uses

type KubeResources []KubeResource

KubeResources is an array of resources

func (KubeResources) Collections Uses

func (k KubeResources) Collections() []collection.Name

Collections returns the name of collections for this set of resources

func (KubeResources) DisabledCollections Uses

func (k KubeResources) DisabledCollections() collection.Names

DisabledCollections returns the names of disabled collections

func (KubeResources) Find Uses

func (k KubeResources) Find(group, kind string) (KubeResource, bool)

Find searches and returns the resource spec with the given group/kind

func (KubeResources) MustFind Uses

func (k KubeResources) MustFind(group, kind string) KubeResource

MustFind calls Find and panics if not found.

type KubeSource Uses

type KubeSource struct {
    // contains filtered or unexported fields

KubeSource is configuration for K8s based input sources.

func (*KubeSource) Resources Uses

func (k *KubeSource) Resources() KubeResources

Resources is all known K8s resources

type Mapping Uses

type Mapping struct {
    // Bidirectional mapping of collections & kinds for non-legacy resources.
    KindsToCollections map[string]string
    CollectionsToKinds map[string]string

Mapping between MCP collections and and CRD Kinds.

func ConstructKindMapping Uses

func ConstructKindMapping(allKinds []string, metadata *Metadata) (*Mapping, error)

ConstructKindMapping constructs a Mapping of kinds to collections. This is mainly used for Mixer v1, and should not be depended on generally

func (*Mapping) Collections Uses

func (m *Mapping) Collections() []string

Collections returns all collections that should be requested from the MCP server.

func (*Mapping) Kind Uses

func (m *Mapping) Kind(collection string) string

Kind returns the kind for the given collection

type Metadata Uses

type Metadata struct {
    // contains filtered or unexported fields

Metadata is the top-level container.

func Build Uses

func Build(astm *ast.Metadata) (*Metadata, error)

Build strongly-typed Metadata from parsed AST.

func ParseAndBuild Uses

func ParseAndBuild(yamlText string) (*Metadata, error)

ParseAndBuild parses the given metadata file and returns the strongly typed schema.

func (*Metadata) AllCollections Uses

func (m *Metadata) AllCollections() collection.Specs

AllCollections is all known collections

func (*Metadata) AllCollectionsInSnapshots Uses

func (m *Metadata) AllCollectionsInSnapshots(snapshotNames []string) []string

AllCollectionsInSnapshots returns an aggregate list of names of collections that will appear in the specified snapshots.

func (*Metadata) AllSnapshots Uses

func (m *Metadata) AllSnapshots() []*Snapshot

AllSnapshots returns all known snapshots

func (*Metadata) AllSources Uses

func (m *Metadata) AllSources() []Source

AllSources is all known sources

func (*Metadata) DirectTransformSettings Uses

func (m *Metadata) DirectTransformSettings() *DirectTransformSettings

DirectTransformSettings is a temporary convenience function for getting the Direct TransformSettings config. As the infrastructure is generified, then this method should disappear.

func (*Metadata) KubeSource Uses

func (m *Metadata) KubeSource() *KubeSource

KubeSource is a temporary convenience function for getting the Kubernetes Source. As the infrastructure is generified, then this method should disappear.

func (*Metadata) TransformSettings Uses

func (m *Metadata) TransformSettings() []TransformSettings

TransformSettings is all known transformSettings

type Snapshot Uses

type Snapshot struct {
    Name        string
    Collections []collection.Name
    Strategy    string

Snapshot metadata. Describes the snapshots that should be produced.

type Source Uses

type Source interface {

Source configuration metadata.

type TransformSettings Uses

type TransformSettings interface {
    Type() string

TransformSettings is configuration that is supplied to a particular transform.



Package schema imports 5 packages (graph) and is imported by 16 packages. Updated 2019-11-06. Refresh now. Tools for package owners.