protobuf

package
v0.0.0-...-2bd7d10 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: BSD-3-Clause Imports: 4 Imported by: 2

README

Updating the protocol

The protocol spec for protobuf must be compile if it is updated. To do this you must run:

protoc --go_out=. entry.proto

Documentation

Overview

Package protobuf is a generated protocol buffer package.

It is generated from these files:

entry.proto

It has these top-level messages:

Entry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

Marshal is an implementation of a MarshalFunc specifically for use with this handler. Although it accepts an empty interface type, it will only work with an apex.log.Entry type, and will return an error if any other type is passed in. Not that this mechanism also enforces the rule that any fields set must either be strings or satisfy the fmt.Stringer interface.

func Unmarshal

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

Unmarshal is an implementation of a UnmarshalFunc specifically for unmarshalling an Entry back into apex.log.Entry.

Types

type Entry

type Entry struct {
	Fields    map[string]string `` /* 132-byte string literal not displayed */
	Level     string            `protobuf:"bytes,2,opt,name=Level" json:"Level,omitempty"`
	Timestamp []byte            `protobuf:"bytes,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Message   string            `protobuf:"bytes,4,opt,name=Message" json:"Message,omitempty"`
}

func (*Entry) Descriptor

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

func (*Entry) GetFields

func (m *Entry) GetFields() map[string]string

func (*Entry) GetLevel

func (m *Entry) GetLevel() string

func (*Entry) GetMessage

func (m *Entry) GetMessage() string

func (*Entry) GetTimestamp

func (m *Entry) GetTimestamp() []byte

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

Jump to

Keyboard shortcuts

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