format

package
v0.0.0-...-d195741 Latest Latest
Warning

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

Go to latest
Published: May 27, 2015 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Overview

Package format is a generated protocol buffer package.

It is generated from these files:

ci.proto

It has these top-level messages:

Jobid
Job
Execution
Server
Request
Response
ListRequest
ListResponse
LogRequest
LogResponse
AddRequest
RemoveRequest

Index

Constants

This section is empty.

Variables

View Source
var CIProtocolMd = []byte{}/* 3150 elements not displayed */

Functions

func RequestDecode

func RequestDecode(data *Request, r *http.Request) error

RequestDecode decodes 'r' the request into 'data'.

func RequestEncode

func RequestEncode(r *http.Request, data *Request) (err error)

RequestEncode encodes 'data' into the request.

func ResponseDecode

func ResponseDecode(data *Response, r *http.Response) error

func ResponseWriterEncode

func ResponseWriterEncode(w http.ResponseWriter, data *Response) error

ResponseWriterEncode encode a format.Response into the ResponseWriter.

Types

type AddRequest

type AddRequest struct {
	Id               *Jobid `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*AddRequest) GetId

func (m *AddRequest) GetId() *Jobid

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) Reset

func (m *AddRequest) Reset()

func (*AddRequest) String

func (m *AddRequest) String() string

type Execution

type Execution struct {
	Version          *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"`
	Start            *int64  `protobuf:"varint,2,req,name=start" json:"start,omitempty"`
	End              *int64  `protobuf:"varint,3,req,name=end" json:"end,omitempty"`
	Errcode          *int32  `protobuf:"varint,4,req,name=errcode" json:"errcode,omitempty"`
	Result           *string `protobuf:"bytes,5,opt,name=result" json:"result,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Execution) GetEnd

func (m *Execution) GetEnd() int64

func (*Execution) GetErrcode

func (m *Execution) GetErrcode() int32

func (*Execution) GetResult

func (m *Execution) GetResult() string

func (*Execution) GetStart

func (m *Execution) GetStart() int64

func (*Execution) GetVersion

func (m *Execution) GetVersion() string

func (*Execution) ProtoMessage

func (*Execution) ProtoMessage()

func (*Execution) Reset

func (m *Execution) Reset()

func (*Execution) String

func (m *Execution) String() string

type Job

type Job struct {
	Id               *Jobid     `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
	Refresh          *Execution `protobuf:"bytes,4,req,name=refresh" json:"refresh,omitempty"`
	Build            *Execution `protobuf:"bytes,5,req,name=build" json:"build,omitempty"`
	XXX_unrecognized []byte     `json:"-"`
}

func (*Job) GetBuild

func (m *Job) GetBuild() *Execution

func (*Job) GetId

func (m *Job) GetId() *Jobid

func (*Job) GetRefresh

func (m *Job) GetRefresh() *Execution

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

type Jobid

type Jobid struct {
	Name             *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	Remote           *string `protobuf:"bytes,2,req,name=remote" json:"remote,omitempty"`
	Branch           *string `protobuf:"bytes,3,req,name=branch" json:"branch,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Jobid) GetBranch

func (m *Jobid) GetBranch() string

func (*Jobid) GetName

func (m *Jobid) GetName() string

func (*Jobid) GetRemote

func (m *Jobid) GetRemote() string

func (*Jobid) ProtoMessage

func (*Jobid) ProtoMessage()

func (*Jobid) Reset

func (m *Jobid) Reset()

func (*Jobid) String

func (m *Jobid) String() string

type ListRequest

type ListRequest struct {
	RefreshResult    *bool  `protobuf:"varint,1,opt,name=refreshResult" json:"refreshResult,omitempty"`
	BuildResult      *bool  `protobuf:"varint,2,opt,name=buildResult" json:"buildResult,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*ListRequest) GetBuildResult

func (m *ListRequest) GetBuildResult() bool

func (*ListRequest) GetRefreshResult

func (m *ListRequest) GetRefreshResult() bool

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Jobs             []*Job `protobuf:"bytes,1,rep,name=jobs" json:"jobs,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*ListResponse) GetJobs

func (m *ListResponse) GetJobs() []*Job

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) String

func (m *ListResponse) String() string

type LogRequest

type LogRequest struct {
	Jobname          *string `protobuf:"bytes,1,req,name=jobname" json:"jobname,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*LogRequest) GetJobname

func (m *LogRequest) GetJobname() string

func (*LogRequest) ProtoMessage

func (*LogRequest) ProtoMessage()

func (*LogRequest) Reset

func (m *LogRequest) Reset()

func (*LogRequest) String

func (m *LogRequest) String() string

type LogResponse

type LogResponse struct {
	Job              *Job   `protobuf:"bytes,1,req,name=job" json:"job,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*LogResponse) GetJob

func (m *LogResponse) GetJob() *Job

func (*LogResponse) ProtoMessage

func (*LogResponse) ProtoMessage()

func (*LogResponse) Reset

func (m *LogResponse) Reset()

func (*LogResponse) String

func (m *LogResponse) String() string

type ProtoClient

type ProtoClient struct {
	*http.Client
	URL string
}

ProtoClient is a layer on top of an http.Client to handle just protobuf based exchange.

func NewClient

func NewClient(url string) *ProtoClient

NewClient just create a default instance of ProtoClient.

func (*ProtoClient) Proto

func (c *ProtoClient) Proto(pbrequest *Request) (resp *Response, err error)

Proto is the new function on top of http.Client. performs a "POST" with a pbrequest encoded in the body, and wait for an http response with a format.Response encoded.

type RemoveRequest

type RemoveRequest struct {
	Jobname          *string `protobuf:"bytes,1,req,name=jobname" json:"jobname,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*RemoveRequest) GetJobname

func (m *RemoveRequest) GetJobname() string

func (*RemoveRequest) ProtoMessage

func (*RemoveRequest) ProtoMessage()

func (*RemoveRequest) Reset

func (m *RemoveRequest) Reset()

func (*RemoveRequest) String

func (m *RemoveRequest) String() string

type Request

type Request struct {
	List             *ListRequest   `protobuf:"bytes,2,opt,name=list" json:"list,omitempty"`
	Log              *LogRequest    `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"`
	Add              *AddRequest    `protobuf:"bytes,4,opt,name=add" json:"add,omitempty"`
	Remove           *RemoveRequest `protobuf:"bytes,5,opt,name=remove" json:"remove,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

func (*Request) GetAdd

func (m *Request) GetAdd() *AddRequest

func (*Request) GetList

func (m *Request) GetList() *ListRequest

func (*Request) GetLog

func (m *Request) GetLog() *LogRequest

func (*Request) GetRemove

func (m *Request) GetRemove() *RemoveRequest

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Response

type Response struct {
	Error            *string       `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	List             *ListResponse `protobuf:"bytes,2,opt,name=list" json:"list,omitempty"`
	Log              *LogResponse  `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"`
	XXX_unrecognized []byte        `json:"-"`
}

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetList

func (m *Response) GetList() *ListResponse

func (*Response) GetLog

func (m *Response) GetLog() *LogResponse

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type Server

type Server struct {
	Jobs             []*Job `protobuf:"bytes,1,rep,name=jobs" json:"jobs,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*Server) GetJobs

func (m *Server) GetJobs() []*Job

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) String

func (m *Server) String() string

Jump to

Keyboard shortcuts

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