material

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package material is a generated protocol buffer package.

It is generated from these files:

material/material.proto

It has these top-level messages:

Material

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMaterial = fmt.Errorf("proto: negative length found during unmarshaling")
)

Functions

This section is empty.

Types

type DB

type DB interface {
	// LoadMaterial retrieves Material data from a backing store.
	LoadMaterial([]byte) (*Material, error)

	// StoreMaterial saves Material data to a backing store.
	StoreMaterial(*Material) error
}

DB interface for loading and storing material.

type Material

type Material struct {
	Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"`

	ID   []byte   `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Data [][]byte `protobuf:"bytes,4,rep,name=data" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(id []byte, data [][]byte) (*Material, error)

New constructs a new Material for an id & data.

func (*Material) Comment

func (m *Material) Comment() string

Comment string

func (*Material) Digest

func (m *Material) Digest() ([]byte, error)

Digest returns a unique series of bytes that identify the Material.

func (*Material) Marshal

func (m *Material) Marshal() (data []byte, err error)

func (*Material) MarshalTo

func (m *Material) MarshalTo(data []byte) (int, error)

func (*Material) ProtoMessage

func (*Material) ProtoMessage()

func (*Material) Reset

func (m *Material) Reset()

func (*Material) Size

func (m *Material) Size() (n int)

func (*Material) String

func (m *Material) String() string

func (*Material) Unmarshal

func (m *Material) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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