serializer

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package serializer provides functionality for serializing protocol buffer messages into different formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Serializer

type Serializer interface {
	Serialize(proto.Message) ([]byte, error)
}

Serializer is an interface that wraps a method to serialize a proto.Message to a []byte.

var EnvFile Serializer = new(envFile)

EnvFile is a Serializer that serializes a proto.message as an environment variable file. For each top-level key in the message, a line key=value is appended to the output, where key is the field's JSON name and value is the string string representation of the field's value.

var SettingsJs Serializer = new(settingsJs)

SettingsJs is a Serializer that serializes a proto.Message by outputting a JavaScript file to be consumed by Deck.

var Yaml Serializer = new(yaml)

Yaml is a Serializer that serializes a proto.Message in YAML format.

Jump to

Keyboard shortcuts

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