api

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: AGPL-3.0 Imports: 5 Imported by: 16

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

apiV0.0.0.proto

It has these top-level messages:

Nil
File
Issue
IssueRange
Position
Config
Option
Info
SchemaVersion

Index

Constants

This section is empty.

Variables

View Source
var SchemaVersionVersion_name = map[int32]string{
	0: "V000",
}
View Source
var SchemaVersionVersion_value = map[string]int32{
	"V000": 0,
}

Functions

func RegisterTenetServer

func RegisterTenetServer(s *grpc.Server, srv TenetServer)

Types

type Config

type Config struct {
	Options []*Option `protobuf:"bytes,1,rep,name=options" json:"options,omitempty"`
}

func (*Config) GetOptions

func (m *Config) GetOptions() []*Option

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

type File

type File struct {
	// name of file.
	Name  string  `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Lines []int64 `protobuf:"varint,2,rep,name=lines" json:"lines,omitempty"`
}

File to be reviewed.

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (m *File) Reset()

func (*File) String

func (m *File) String() string

type Info

type Info struct {
	Name        string    `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Usage       string    `protobuf:"bytes,2,opt,name=usage" json:"usage,omitempty"`
	Description string    `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
	Version     string    `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
	Tags        []string  `protobuf:"bytes,5,rep,name=tags" json:"tags,omitempty"`
	Metrics     []string  `protobuf:"bytes,6,rep,name=metrics" json:"metrics,omitempty"`
	Language    string    `protobuf:"bytes,7,opt,name=language" json:"language,omitempty"`
	Options     []*Option `protobuf:"bytes,8,rep,name=options" json:"options,omitempty"`
}

Info contains metadata about this tenet.

func (*Info) GetOptions

func (m *Info) GetOptions() []*Option

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) Reset

func (m *Info) Reset()

func (*Info) String

func (m *Info) String() string

type Issue

type Issue struct {
	// The name of the issue.
	Name      string            `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Position  *IssueRange       `protobuf:"bytes,2,opt,name=position" json:"position,omitempty"`
	Comment   string            `protobuf:"bytes,3,opt,name=comment" json:"comment,omitempty"`
	CtxBefore string            `protobuf:"bytes,4,opt,name=ctxBefore" json:"ctxBefore,omitempty"`
	LineText  string            `protobuf:"bytes,5,opt,name=lineText" json:"lineText,omitempty"`
	CtxAfter  string            `protobuf:"bytes,6,opt,name=ctxAfter" json:"ctxAfter,omitempty"`
	Metrics   map[string]string `` /* 134-byte string literal not displayed */
	Tags      []string          `protobuf:"bytes,8,rep,name=tags" json:"tags,omitempty"`
	Link      string            `protobuf:"bytes,9,opt,name=link" json:"link,omitempty"`
	NewCode   bool              `protobuf:"varint,10,opt,name=newCode" json:"newCode,omitempty"`
	Patch     string            `protobuf:"bytes,11,opt,name=patch" json:"patch,omitempty"`
	Err       string            `protobuf:"bytes,12,opt,name=err" json:"err,omitempty"`
}

Issue returned from a review.

func (*Issue) GetMetrics

func (m *Issue) GetMetrics() map[string]string

func (*Issue) GetPosition

func (m *Issue) GetPosition() *IssueRange

func (*Issue) ProtoMessage

func (*Issue) ProtoMessage()

func (*Issue) Reset

func (m *Issue) Reset()

func (*Issue) String

func (m *Issue) String() string

type IssueRange

type IssueRange struct {
	Start *Position `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"`
	End   *Position `protobuf:"bytes,2,opt,name=end" json:"end,omitempty"`
}

func (*IssueRange) GetEnd

func (m *IssueRange) GetEnd() *Position

func (*IssueRange) GetStart

func (m *IssueRange) GetStart() *Position

func (*IssueRange) ProtoMessage

func (*IssueRange) ProtoMessage()

func (*IssueRange) Reset

func (m *IssueRange) Reset()

func (*IssueRange) String

func (m *IssueRange) String() string

type Nil

type Nil struct {
}

TODO(waigani) This is a work around. How do we call methods without args?

func (*Nil) ProtoMessage

func (*Nil) ProtoMessage()

func (*Nil) Reset

func (m *Nil) Reset()

func (*Nil) String

func (m *Nil) String() string

type Option

type Option struct {
	Name  string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	Usage string `protobuf:"bytes,3,opt,name=usage" json:"usage,omitempty"`
}

func (*Option) ProtoMessage

func (*Option) ProtoMessage()

func (*Option) Reset

func (m *Option) Reset()

func (*Option) String

func (m *Option) String() string

type Position

type Position struct {
	Filename string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
	Offset   int64  `protobuf:"varint,2,opt,name=Offset" json:"Offset,omitempty"`
	Line     int64  `protobuf:"varint,3,opt,name=Line" json:"Line,omitempty"`
	Column   int64  `protobuf:"varint,4,opt,name=Column" json:"Column,omitempty"`
}

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) Reset

func (m *Position) Reset()

func (*Position) String

func (m *Position) String() string

type SchemaVersion

type SchemaVersion struct {
}

func (*SchemaVersion) ProtoMessage

func (*SchemaVersion) ProtoMessage()

func (*SchemaVersion) Reset

func (m *SchemaVersion) Reset()

func (*SchemaVersion) String

func (m *SchemaVersion) String() string

type SchemaVersionVersion

type SchemaVersionVersion int32

Really we just need a string lit here. Is that possible?

const (
	SchemaVersion_V000 SchemaVersionVersion = 0
)

func (SchemaVersionVersion) String

func (x SchemaVersionVersion) String() string

type TenetClient

type TenetClient interface {
	// Takes a stream of File to be reviewed and returns a stream of Issue.
	Review(ctx context.Context, opts ...grpc.CallOption) (Tenet_ReviewClient, error)
	// Info returns metadata about this tenet.
	GetInfo(ctx context.Context, in *Nil, opts ...grpc.CallOption) (*Info, error)
	// Returns the version of the api schema. // TODO(waigani) ideally, we'd
	// set a string literal here.
	APIVersion(ctx context.Context, in *Nil, opts ...grpc.CallOption) (*SchemaVersion, error)
	// Configure the tenet with user defined options. These come either
	// from .lingo or passed in on the CLI.
	Configure(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Nil, error)
}

func NewTenetClient

func NewTenetClient(cc *grpc.ClientConn) TenetClient

type TenetServer

type TenetServer interface {
	// Takes a stream of File to be reviewed and returns a stream of Issue.
	Review(Tenet_ReviewServer) error
	// Info returns metadata about this tenet.
	GetInfo(context.Context, *Nil) (*Info, error)
	// Returns the version of the api schema. // TODO(waigani) ideally, we'd
	// set a string literal here.
	APIVersion(context.Context, *Nil) (*SchemaVersion, error)
	// Configure the tenet with user defined options. These come either
	// from .lingo or passed in on the CLI.
	Configure(context.Context, *Config) (*Nil, error)
}

type Tenet_ReviewClient

type Tenet_ReviewClient interface {
	Send(*File) error
	Recv() (*Issue, error)
	grpc.ClientStream
}

type Tenet_ReviewServer

type Tenet_ReviewServer interface {
	Send(*Issue) error
	Recv() (*File, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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