docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/options Index | Files

package options

import "github.com/docker/docker/vendor/github.com/docker/libnetwork/options"

Package options provides a way to pass unstructured sets of options to a component expecting a strongly-typed configuration structure.

Index

Package Files

options.go

func GenerateFromModel Uses

func GenerateFromModel(options Generic, model interface{}) (interface{}, error)

GenerateFromModel takes the generic options, and tries to build a new instance of the model's type by matching keys from the generic options to fields in the model.

The return value is of the same type than the model (including a potential pointer qualifier).

type CannotSetFieldError Uses

type CannotSetFieldError struct {
    Field string
    Type  string
}

CannotSetFieldError is the error returned when the generic parameters hold a value for a field that cannot be set in the destination structure.

func (CannotSetFieldError) Error Uses

func (e CannotSetFieldError) Error() string

type Generic Uses

type Generic map[string]interface{}

Generic is a basic type to store arbitrary settings.

func NewGeneric Uses

func NewGeneric() Generic

NewGeneric returns a new Generic instance.

type NoSuchFieldError Uses

type NoSuchFieldError struct {
    Field string
    Type  string
}

NoSuchFieldError is the error returned when the generic parameters hold a value for a field absent from the destination structure.

func (NoSuchFieldError) Error Uses

func (e NoSuchFieldError) Error() string

type TypeMismatchError Uses

type TypeMismatchError struct {
    Field      string
    ExpectType string
    ActualType string
}

TypeMismatchError is the error returned when the type of the generic value for a field mismatches the type of the destination structure.

func (TypeMismatchError) Error Uses

func (e TypeMismatchError) Error() string

Package options imports 2 packages (graph). Updated 2017-03-29. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).