spreadproto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package spreadproto is a generated protocol buffer package.

It is generated from these files:

object.proto

It has these top-level messages:

Field
Object
Array
SRI
Link
Document
DocumentInfo
Parameter
Argument

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument struct {
	// Types that are valid to be assigned to Value:
	//	*Argument_Number
	//	*Argument_Str
	//	*Argument_Boolean
	Value isArgument_Value `protobuf_oneof:"value"`
}

Argument contains an argument to fulfill a parameter.

func (*Argument) Descriptor

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

func (*Argument) GetBoolean

func (m *Argument) GetBoolean() bool

func (*Argument) GetNumber

func (m *Argument) GetNumber() float64

func (*Argument) GetStr

func (m *Argument) GetStr() string

func (*Argument) GetValue

func (m *Argument) GetValue() isArgument_Value

func (*Argument) ProtoMessage

func (*Argument) ProtoMessage()

func (*Argument) Reset

func (m *Argument) Reset()

func (*Argument) String

func (m *Argument) String() string

func (*Argument) XXX_OneofFuncs

func (*Argument) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Argument_Boolean

type Argument_Boolean struct {
	Boolean bool `protobuf:"varint,3,opt,name=boolean,oneof"`
}

type Argument_Number

type Argument_Number struct {
	Number float64 `protobuf:"fixed64,1,opt,name=number,oneof"`
}

type Argument_Str

type Argument_Str struct {
	Str string `protobuf:"bytes,2,opt,name=str,oneof"`
}

type Array

type Array struct {
	Items []*Field `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

Array represents an array.

func (*Array) Descriptor

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

func (*Array) GetItems

func (m *Array) GetItems() []*Field

func (*Array) ProtoMessage

func (*Array) ProtoMessage()

func (*Array) Reset

func (m *Array) Reset()

func (*Array) String

func (m *Array) String() string

type Document

type Document struct {
	Name string        `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Info *DocumentInfo `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
	Root *Field        `protobuf:"bytes,3,opt,name=root" json:"root,omitempty"`
}

Document is the root of Spread data stored in a Git blob. It has field stored at it's root, typically with an object as it's value.

func (*Document) Descriptor

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

func (*Document) GetInfo

func (m *Document) GetInfo() *DocumentInfo

func (*Document) GetRoot

func (m *Document) GetRoot() *Field

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) Reset

func (m *Document) Reset()

func (*Document) String

func (m *Document) String() string

type DocumentInfo

type DocumentInfo struct {
	Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
}

DocumentInfo provides metadata about an document.

func (*DocumentInfo) Descriptor

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

func (*DocumentInfo) ProtoMessage

func (*DocumentInfo) ProtoMessage()

func (*DocumentInfo) Reset

func (m *DocumentInfo) Reset()

func (*DocumentInfo) String

func (m *DocumentInfo) String() string

type Field

type Field struct {
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*Field_Number
	//	*Field_Str
	//	*Field_Boolean
	//	*Field_Object
	//	*Field_Array
	//	*Field_Link
	Value isField_Value `protobuf_oneof:"value"`
	Param *Parameter    `protobuf:"bytes,8,opt,name=param" json:"param,omitempty"`
}

Field represents a field of an object.

func (*Field) Descriptor

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

func (*Field) GetArray

func (m *Field) GetArray() *Array

func (*Field) GetBoolean

func (m *Field) GetBoolean() bool
func (m *Field) GetLink() *Link

func (*Field) GetNumber

func (m *Field) GetNumber() float64

func (*Field) GetObject

func (m *Field) GetObject() *Object

func (*Field) GetParam

func (m *Field) GetParam() *Parameter

func (*Field) GetStr

func (m *Field) GetStr() string

func (*Field) GetValue

func (m *Field) GetValue() isField_Value

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) String

func (m *Field) String() string

func (*Field) XXX_OneofFuncs

func (*Field) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Field_Array

type Field_Array struct {
	Array *Array `protobuf:"bytes,6,opt,name=array,oneof"`
}

type Field_Boolean

type Field_Boolean struct {
	Boolean bool `protobuf:"varint,4,opt,name=boolean,oneof"`
}
type Field_Link struct {
	Link *Link `protobuf:"bytes,7,opt,name=link,oneof"`
}

type Field_Number

type Field_Number struct {
	Number float64 `protobuf:"fixed64,2,opt,name=number,oneof"`
}

type Field_Object

type Field_Object struct {
	Object *Object `protobuf:"bytes,5,opt,name=object,oneof"`
}

type Field_Str

type Field_Str struct {
	Str string `protobuf:"bytes,3,opt,name=str,oneof"`
}
type Link struct {
	PackageName string      `protobuf:"bytes,1,opt,name=packageName" json:"packageName,omitempty"`
	Target      *SRI        `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"`
	Override    bool        `protobuf:"varint,3,opt,name=override" json:"override,omitempty"`
	Args        []*Argument `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
}

Link represents a relationship to another field.

func (*Link) Descriptor

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

func (*Link) GetArgs

func (m *Link) GetArgs() []*Argument

func (*Link) GetTarget

func (m *Link) GetTarget() *SRI

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) Reset

func (m *Link) Reset()

func (*Link) String

func (m *Link) String() string

type Object

type Object struct {
	Items map[string]*Field `` /* 130-byte string literal not displayed */
}

Object represents a map with strings for keys.

func (*Object) Descriptor

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

func (*Object) GetItems

func (m *Object) GetItems() map[string]*Field

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) Reset

func (m *Object) Reset()

func (*Object) String

func (m *Object) String() string

type Parameter

type Parameter struct {
	Name    string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Prompt  string `protobuf:"bytes,2,opt,name=prompt" json:"prompt,omitempty"`
	Pattern string `protobuf:"bytes,3,opt,name=pattern" json:"pattern,omitempty"`
	// Default is the value a parameter will take if no argument is given for it. Parameters without defaults require args.
	Default *Argument `protobuf:"bytes,4,opt,name=default" json:"default,omitempty"`
}

Parameter allows user input to be used in producing the output of the field.

func (*Parameter) Descriptor

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

func (*Parameter) GetDefault

func (m *Parameter) GetDefault() *Argument

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) Reset

func (m *Parameter) Reset()

func (*Parameter) String

func (m *Parameter) String() string

type SRI

type SRI struct {
	Treeish string `protobuf:"bytes,1,opt,name=treeish" json:"treeish,omitempty"`
	Path    string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	Field   string `protobuf:"bytes,3,opt,name=field" json:"field,omitempty"`
}

A SRI represents a parsed Spread Resource Identifier (SRI), a globally unique address for a document or field stored within a repository.

func (*SRI) Descriptor

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

func (*SRI) ProtoMessage

func (*SRI) ProtoMessage()

func (*SRI) Reset

func (m *SRI) Reset()

func (*SRI) String

func (m *SRI) String() string

Jump to

Keyboard shortcuts

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