config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

For joining the Marshal and Unmarshal methods for all supported config types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigType

type ConfigType interface {
	Marshal(interface{}) ([]byte, error)
	Unmarshal([]byte, interface{}) error
}

ConfigType is a generic interface for marshalling and unmarshalling config types

type JsonConfig

type JsonConfig struct{}

JsonConfig implements the ConfigType interface

func (JsonConfig) Marshal

func (JsonConfig) Marshal(v interface{}) ([]byte, error)

func (JsonConfig) Unmarshal

func (JsonConfig) Unmarshal(data []byte, v interface{}) error

type YamlConfig

type YamlConfig struct{}

YamlConfig implements the ConfigType interface

func (YamlConfig) Marshal

func (YamlConfig) Marshal(v interface{}) ([]byte, error)

func (YamlConfig) Unmarshal

func (YamlConfig) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

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