istio: istio.io/istio/pkg/config/schema Index | Files

package schema

import "istio.io/istio/pkg/config/schema"

Index

Package Files

instance.go set.go

type Instance Uses

type Instance struct {
    // ClusterScoped is true for resource in cluster-level.
    ClusterScoped bool

    // VariableName is the name of the generated go variable for this schema. Leave blank to infer from the 'Type' below.
    // This field is used to generate Kube CRD types map (pilot/pkg/config/kube/crd/types.go).
    VariableName string

    // Type is the config proto type.
    Type string

    // Plural is the type in plural.
    Plural string

    // Group is the config proto group.
    Group string

    // Version is the config proto version.
    Version string

    // MessageName refers to the protobuf message type name corresponding to the type
    MessageName string

    // Validate configuration as a protobuf message assuming the object is an
    // instance of the expected message type
    Validate validation.ValidateFunc

    // MCP collection for this configuration resource schema
    Collection string
}

Instance provides description of the configuration schema and its key function nolint: maligned

func (*Instance) FromJSON Uses

func (i *Instance) FromJSON(js string) (proto.Message, error)

FromJSON converts a canonical JSON to a proto message

func (*Instance) FromJSONMap Uses

func (i *Instance) FromJSONMap(data interface{}) (proto.Message, error)

FromJSONMap converts from a generic map to a proto message using canonical JSON encoding JSON encoding is specified here: https://developers.google.com/protocol-buffers/docs/proto3#json

func (*Instance) FromYAML Uses

func (i *Instance) FromYAML(yml string) (proto.Message, error)

FromYAML converts a canonical YAML to a proto message

func (*Instance) Make Uses

func (i *Instance) Make() (proto.Message, error)

Make creates a new instance of the proto message

type Set Uses

type Set []Instance

Set defines a set of schema Instances.

func (Set) GetByType Uses

func (s Set) GetByType(name string) (Instance, bool)

GetByType finds a schema by type if it is available

func (Set) Types Uses

func (s Set) Types() []string

Types lists all known types in the schema set

func (Set) Validate Uses

func (s Set) Validate() error

Validate checks that each name conforms to the spec and has a schema Instance

Package schema imports 8 packages (graph) and is imported by 28 packages. Updated 2019-09-24. Refresh now. Tools for package owners.