istio: istio.io/istio/galley/pkg/config/meta/schema/collection Index | Files

package collection

import "istio.io/istio/galley/pkg/config/meta/schema/collection"

Index

Package Files

name.go names.go spec.go specs.go

Variables

var EmptyName = Name{}

EmptyName is a sentinel value

func IsValidName Uses

func IsValidName(name string) bool

IsValidName returns true if the given collection is a valid name.

type Name Uses

type Name struct {
    // contains filtered or unexported fields
}

Name of a collection.

func NewName Uses

func NewName(n string) Name

NewName returns a strongly typed collection. Panics if the name is not valid.

func (Name) String Uses

func (t Name) String() string

String interface method implementation.

type Names Uses

type Names []Name

Names is a collection of names

func (Names) Clone Uses

func (n Names) Clone() Names

Clone names

type Spec Uses

type Spec struct {
    // Source of the resource that this info is about
    Name Name

    // Proto package name that contains the MessageName type. This is mainly used by code-generation tools.
    ProtoPackage string

    // The MessageName for the proto
    MessageName string
}

Spec is the metadata for a resource collection.

func MustNewSpec Uses

func MustNewSpec(name, protoPackage, messageName string) Spec

MustNewSpec calls NewSpec and panics if it fails.

func NewSpec Uses

func NewSpec(name, protoPackage, messageName string) (Spec, error)

NewSpec returns a new instance of Spec, or error if the input is not valid.

func (*Spec) NewProtoInstance Uses

func (s *Spec) NewProtoInstance() proto.Message

NewProtoInstance returns a new instance of the underlying proto for this resource.

func (*Spec) String Uses

func (s *Spec) String() string

String interface method implementation.

func (*Spec) Validate Uses

func (s *Spec) Validate() error

Validate the specs. Returns error if there is a problem.

type Specs Uses

type Specs struct {
    // contains filtered or unexported fields
}

Specs contains metadata about configuration resources.

func (Specs) All Uses

func (s Specs) All() []Spec

All returns all known Specs

func (Specs) CollectionNames Uses

func (s Specs) CollectionNames() []string

CollectionNames returns all known collections.

func (Specs) Get Uses

func (s Specs) Get(collection string) Spec

Get looks up a resource.Spec by its collection. Panics if it is not found.

func (Specs) Lookup Uses

func (s Specs) Lookup(collection string) (Spec, bool)

Lookup looks up a Spec by its collection name.

func (Specs) Validate Uses

func (s Specs) Validate() error

Validate the specs. Returns error if there is a problem.

type SpecsBuilder Uses

type SpecsBuilder struct {
    // contains filtered or unexported fields
}

SpecsBuilder is a builder for the specs type.

func NewSpecsBuilder Uses

func NewSpecsBuilder() *SpecsBuilder

NewSpecsBuilder returns a new instance of SpecsBuilder.

func (*SpecsBuilder) Add Uses

func (b *SpecsBuilder) Add(s Spec) error

Add a new collection to the specs.

func (*SpecsBuilder) Build Uses

func (b *SpecsBuilder) Build() Specs

Build a new specs from this SpecsBuilder.

func (*SpecsBuilder) MustAdd Uses

func (b *SpecsBuilder) MustAdd(s Spec)

MustAdd calls Add and panics if it fails.

func (*SpecsBuilder) Remove Uses

func (b *SpecsBuilder) Remove(c Name)

Remove a Spec from the builder.

func (*SpecsBuilder) UnregisterSpecs Uses

func (b *SpecsBuilder) UnregisterSpecs(s Specs) *SpecsBuilder

UnregisterSpecs unregisters all specs in s from this builder.

Package collection imports 5 packages (graph) and is imported by 28 packages. Updated 2019-10-08. Refresh now. Tools for package owners.