f

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package f provides simple test fixtures for uconfig.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anon

type Anon struct {
	Version string
}

Anon is part of text fixtures.

type Config

type Config struct {
	Anon
	GoHard  bool
	Redis   Redis
	Rethink RethinkConfig
}

Config is part of text fixtures.

type ElemPtrUnmarshalerSlice added in v0.7.0

type ElemPtrUnmarshalerSlice []*ReadableDirection

type ElemUnmarshalerSlice added in v0.7.0

type ElemUnmarshalerSlice []ReadableDirection

type Host

type Host struct {
	Address string
	Port    string
}

Host is part of text fixtures.

type ReadableDirection added in v0.7.0

type ReadableDirection int

func NewReadableDirection added in v0.7.0

func NewReadableDirection(value int) *ReadableDirection

func (*ReadableDirection) UnmarshalText added in v0.7.0

func (l *ReadableDirection) UnmarshalText(value []byte) error

UnmarshalText is part of encoding.TextUnmarshaler

type Redis

type Redis struct {
	Host string `uconfig:".Address"`
	Port int
}

Redis is part of text fixtures.

type RethinkConfig

type RethinkConfig struct {
	Host     Host
	Db       string `default:"primary" usage:"main database used by our application"`
	Password string `secret:""`
}

RethinkConfig is part of text fixtures.

type TextUnmarshalerStringSlice

type TextUnmarshalerStringSlice []string

TextUnmarshalerStringSlice is an example of encoding.TextUnmarshaler

func (*TextUnmarshalerStringSlice) UnmarshalText

func (l *TextUnmarshalerStringSlice) UnmarshalText(value []byte) error

UnmarshalText is part of encoding.TextUnmarshaler

type Types

type Types struct {
	String   string
	Bool     bool
	Duration time.Duration
	Int      int
	Int8     int8
	Int16    int16
	Int32    int32
	Int64    int64
	Uint     uint
	Uint8    uint8
	Uint16   uint16
	Uint32   uint32
	Uint64   uint64
	Float32  float32
	Float64  float64

	SliceString   []string
	SliceInt      []int
	SliceInt32    []int
	SliceUint     []uint
	SliceFloat32  []float32
	SliceDuration []time.Duration

	SliceTextUnmarshaler    *TextUnmarshalerStringSlice
	SliceElemUnmarshaler    ElemUnmarshalerSlice
	SliceElemPtrUnmarshaler ElemPtrUnmarshalerSlice
}

Types is part of text fixtures.

Jump to

Keyboard shortcuts

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