sync

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sync handles synchronized read and write access to config values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

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

Bool type with concurrent access support.

func (*Bool) Get

func (b *Bool) Get() bool

Get returns the internal value.

func (*Bool) MarshalJSON added in v0.17.0

func (b *Bool) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the value.

func (*Bool) Set

func (b *Bool) Set(value bool)

Set a value.

func (*Bool) SetString added in v0.6.0

func (b *Bool) SetString(val string) error

SetString parses and sets a value from string type.

func (*Bool) String added in v0.4.0

func (b *Bool) String() string

String returns string representation of value.

func (*Bool) UnmarshalJSON added in v0.17.0

func (b *Bool) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

type Float64

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

Float64 type with concurrent access support.

func (*Float64) Get

func (f *Float64) Get() float64

Get returns the internal value.

func (*Float64) MarshalJSON added in v0.17.0

func (f *Float64) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the value.

func (*Float64) Set

func (f *Float64) Set(value float64)

Set a value.

func (*Float64) SetString added in v0.6.0

func (f *Float64) SetString(val string) error

SetString parses and sets a value from string type.

func (*Float64) String added in v0.4.0

func (f *Float64) String() string

String returns string representation of value.

func (*Float64) UnmarshalJSON added in v0.17.0

func (f *Float64) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

type Int64

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

Int64 type with concurrent access support.

func (*Int64) Get

func (i *Int64) Get() int64

Get returns the internal value.

func (*Int64) MarshalJSON added in v0.17.0

func (i *Int64) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the value.

func (*Int64) Set

func (i *Int64) Set(value int64)

Set a value.

func (*Int64) SetString added in v0.6.0

func (i *Int64) SetString(val string) error

SetString parses and sets a value from string type.

func (*Int64) String added in v0.4.0

func (i *Int64) String() string

String returns string representation of value.

func (*Int64) UnmarshalJSON added in v0.17.0

func (i *Int64) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

type Secret added in v0.4.0

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

Secret string type for secrets with concurrent access support.

func (*Secret) Get added in v0.4.0

func (s *Secret) Get() string

Get returns the internal value.

func (*Secret) MarshalJSON added in v0.17.0

func (s *Secret) MarshalJSON() (out []byte, err error)

MarshalJSON returns the JSON encoding of the value.

func (*Secret) Set added in v0.4.0

func (s *Secret) Set(value string)

Set a value.

func (*Secret) SetString added in v0.6.0

func (s *Secret) SetString(val string) error

SetString parses and sets a value from string type.

func (*Secret) String added in v0.4.0

func (s *Secret) String() string

String returns obfuscated string representation of value.

func (*Secret) UnmarshalJSON added in v0.17.0

func (s *Secret) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

type String

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

String type with concurrent access support.

func (*String) Get

func (s *String) Get() string

Get returns the internal value.

func (*String) MarshalJSON added in v0.17.0

func (s *String) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the value.

func (*String) Set

func (s *String) Set(value string)

Set a value.

func (*String) SetString added in v0.6.0

func (s *String) SetString(val string) error

SetString parses and sets a value from string type.

func (*String) String added in v0.4.0

func (s *String) String() string

String returns string representation of value.

func (*String) UnmarshalJSON added in v0.17.0

func (s *String) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

type StringMap added in v0.15.0

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

StringMap is a map[string]string type with concurrent access support.

func (*StringMap) Get added in v0.15.0

func (s *StringMap) Get() map[string]string

Get returns the internal value.

func (*StringMap) MarshalJSON added in v0.17.0

func (s *StringMap) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the value.

func (*StringMap) Set added in v0.15.0

func (s *StringMap) Set(value map[string]string)

Set a value.

func (*StringMap) SetString added in v0.15.0

func (s *StringMap) SetString(val string) error

SetString parses and sets a value from string type.

func (*StringMap) String added in v0.15.0

func (s *StringMap) String() string

String returns a string representation of the value..

func (*StringMap) UnmarshalJSON added in v0.17.0

func (s *StringMap) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

type TimeDuration added in v0.10.0

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

TimeDuration is Time.Duration type with concurrent access support.

func (*TimeDuration) Get added in v0.10.0

func (s *TimeDuration) Get() time.Duration

Get returns the internal value.

func (*TimeDuration) MarshalJSON added in v0.17.0

func (s *TimeDuration) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the value.

func (*TimeDuration) Set added in v0.10.0

func (s *TimeDuration) Set(value time.Duration)

Set a value.

func (*TimeDuration) SetString added in v0.10.0

func (s *TimeDuration) SetString(val string) error

SetString parses and sets a value from string type.

func (*TimeDuration) String added in v0.10.0

func (s *TimeDuration) String() string

String returns string representation of value.

func (*TimeDuration) UnmarshalJSON added in v0.17.0

func (s *TimeDuration) UnmarshalJSON(d []byte) error

MarshalJSON returns the JSON encoding of the value.

Jump to

Keyboard shortcuts

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