wrappers

package
v3.2.11+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWrappers   = fmt.Errorf("proto: integer overflow")
)

Functions

func MarshalTraits

func MarshalTraits(traits *Traits) ([]byte, error)

MarshalTraits will marshal Traits as JSON. Used to embed traits into certificates.

func UnmarshalTraits

func UnmarshalTraits(data []byte, traits *Traits) error

UnmarshalTraits will unmarshal JSON traits. Used to embed traits into certificates.

Types

type LabelValues

type LabelValues struct {
	// Values contains key value pairs.
	Values               map[string]StringValues `` /* 141-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

LabelValues is a list of key value pairs, where key is a string and value is a list of string values.

func (*LabelValues) Descriptor

func (*LabelValues) Descriptor() ([]byte, []int)

func (*LabelValues) Marshal

func (m *LabelValues) Marshal() (dAtA []byte, err error)

func (*LabelValues) MarshalTo

func (m *LabelValues) MarshalTo(dAtA []byte) (int, error)

func (*LabelValues) ProtoMessage

func (*LabelValues) ProtoMessage()

func (*LabelValues) Reset

func (m *LabelValues) Reset()

func (*LabelValues) Size

func (m *LabelValues) Size() (n int)

func (*LabelValues) String

func (m *LabelValues) String() string

func (*LabelValues) Unmarshal

func (m *LabelValues) Unmarshal(dAtA []byte) error

func (*LabelValues) XXX_DiscardUnknown

func (m *LabelValues) XXX_DiscardUnknown()

func (*LabelValues) XXX_Marshal

func (m *LabelValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LabelValues) XXX_Merge

func (dst *LabelValues) XXX_Merge(src proto.Message)

func (*LabelValues) XXX_Size

func (m *LabelValues) XXX_Size() int

func (*LabelValues) XXX_Unmarshal

func (m *LabelValues) XXX_Unmarshal(b []byte) error

type StringValues

type StringValues struct {
	Values               []string `protobuf:"bytes,1,rep,name=Values,json=values" json:"Values,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

StringValues is a list of strings.

func (*StringValues) Descriptor

func (*StringValues) Descriptor() ([]byte, []int)

func (*StringValues) Marshal

func (m *StringValues) Marshal() (dAtA []byte, err error)

func (*StringValues) MarshalTo

func (m *StringValues) MarshalTo(dAtA []byte) (int, error)

func (*StringValues) ProtoMessage

func (*StringValues) ProtoMessage()

func (*StringValues) Reset

func (m *StringValues) Reset()

func (*StringValues) Size

func (m *StringValues) Size() (n int)

func (*StringValues) String

func (m *StringValues) String() string

func (*StringValues) Unmarshal

func (m *StringValues) Unmarshal(dAtA []byte) error

func (*StringValues) XXX_DiscardUnknown

func (m *StringValues) XXX_DiscardUnknown()

func (*StringValues) XXX_Marshal

func (m *StringValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringValues) XXX_Merge

func (dst *StringValues) XXX_Merge(src proto.Message)

func (*StringValues) XXX_Size

func (m *StringValues) XXX_Size() int

func (*StringValues) XXX_Unmarshal

func (m *StringValues) XXX_Unmarshal(b []byte) error

type Strings

type Strings []string

Strings is a list of string that can unmarshal from list of strings or a scalar string from scalar yaml or json property

func (Strings) Marshal

func (s Strings) Marshal() ([]byte, error)

Marshal marshals value into protobuf representation

func (Strings) MarshalJSON

func (s Strings) MarshalJSON() ([]byte, error)

MarshalJSON marshals to scalar value if there is only one value in the list to list otherwise

func (Strings) MarshalTo

func (s Strings) MarshalTo(data []byte) (int, error)

MarshalTo marshals value to the array

func (Strings) MarshalYAML

func (s Strings) MarshalYAML() (interface{}, error)

MarshalYAML marshals to scalar value if there is only one value in the list, marshals to list otherwise

func (Strings) Size

func (s Strings) Size() int

Size returns protobuf size

func (*Strings) Unmarshal

func (s *Strings) Unmarshal(data []byte) error

Unmarshal unmarshals value from protobuf

func (*Strings) UnmarshalJSON

func (s *Strings) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals scalar string or strings slice to Strings

func (*Strings) UnmarshalYAML

func (s *Strings) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML is used to allow Strings to unmarshal from scalar string value or from the list

type Traits

type Traits map[string][]string

Traits is a wrapper around map with string slices as values

func (Traits) Marshal

func (l Traits) Marshal() ([]byte, error)

Marshal marshals value into protobuf representation

func (Traits) MarshalTo

func (l Traits) MarshalTo(data []byte) (int, error)

MarshalTo marshals value to the array

func (Traits) Size

func (l Traits) Size() int

Size returns protobuf size

func (*Traits) Unmarshal

func (l *Traits) Unmarshal(data []byte) error

Unmarshal unmarshals value from protobuf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL