pb

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

root.proto

It has these top-level messages:

LoadRequest
ContentResponse
StatusResponse
DiffResponse
GraphComponent

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var StatusResponse_Run_name = map[int32]string{
	0: "UNSPECIFIED_RUN",
	1: "STARTED",
	2: "FINISHED",
}
View Source
var StatusResponse_Run_value = map[string]int32{
	"UNSPECIFIED_RUN": 0,
	"STARTED":         1,
	"FINISHED":        2,
}
View Source
var StatusResponse_Stage_name = map[int32]string{
	0: "UNSPECIFIED_STAGE",
	1: "PLAN",
	2: "APPLY",
}
View Source
var StatusResponse_Stage_value = map[string]int32{
	"UNSPECIFIED_STAGE": 0,
	"PLAN":              1,
	"APPLY":             2,
}

Functions

func RegisterExecutorHandler

func RegisterExecutorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterExecutorHandler registers the http handlers for service Executor to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterExecutorHandlerFromEndpoint

func RegisterExecutorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterExecutorHandlerFromEndpoint is same as RegisterExecutorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterExecutorServer

func RegisterExecutorServer(s *grpc.Server, srv ExecutorServer)

func RegisterGrapherHandler

func RegisterGrapherHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterGrapherHandler registers the http handlers for service Grapher to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterGrapherHandlerFromEndpoint

func RegisterGrapherHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterGrapherHandlerFromEndpoint is same as RegisterGrapherHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterGrapherServer

func RegisterGrapherServer(s *grpc.Server, srv GrapherServer)

func RegisterInfoHandler

func RegisterInfoHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterInfoHandler registers the http handlers for service Info to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterInfoHandlerFromEndpoint

func RegisterInfoHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterInfoHandlerFromEndpoint is same as RegisterInfoHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterInfoServer

func RegisterInfoServer(s *grpc.Server, srv InfoServer)

func RegisterResourceHostHandler

func RegisterResourceHostHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterResourceHostHandler registers the http handlers for service ResourceHost to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterResourceHostHandlerFromEndpoint

func RegisterResourceHostHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterResourceHostHandlerFromEndpoint is same as RegisterResourceHostHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterResourceHostServer

func RegisterResourceHostServer(s *grpc.Server, srv ResourceHostServer)

Types

type ContentResponse

type ContentResponse struct {
	Content string `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"`
}

func (*ContentResponse) Descriptor

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

func (*ContentResponse) GetContent

func (m *ContentResponse) GetContent() string

func (*ContentResponse) ProtoMessage

func (*ContentResponse) ProtoMessage()

func (*ContentResponse) Reset

func (m *ContentResponse) Reset()

func (*ContentResponse) String

func (m *ContentResponse) String() string

type DiffResponse

type DiffResponse struct {
	Original string `protobuf:"bytes,1,opt,name=original" json:"original,omitempty"`
	Current  string `protobuf:"bytes,2,opt,name=current" json:"current,omitempty"`
	Changes  bool   `protobuf:"varint,3,opt,name=changes" json:"changes,omitempty"`
}

func (*DiffResponse) Descriptor

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

func (*DiffResponse) GetChanges

func (m *DiffResponse) GetChanges() bool

func (*DiffResponse) GetCurrent

func (m *DiffResponse) GetCurrent() string

func (*DiffResponse) GetOriginal

func (m *DiffResponse) GetOriginal() string

func (*DiffResponse) ProtoMessage

func (*DiffResponse) ProtoMessage()

func (*DiffResponse) Reset

func (m *DiffResponse) Reset()

func (*DiffResponse) String

func (m *DiffResponse) String() string

func (*DiffResponse) ToPrintable

func (d *DiffResponse) ToPrintable() resource.Diff

ToPrintable returns a view that can be used in a human printer

type ExecutorClient

type ExecutorClient interface {
	// Healthcheck a module given by the location
	HealthCheck(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (Executor_HealthCheckClient, error)
	// Plan out the execution of a module given by the location
	Plan(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (Executor_PlanClient, error)
	// Apply a module given by the location
	Apply(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (Executor_ApplyClient, error)
}

func NewExecutorClient

func NewExecutorClient(cc *grpc.ClientConn) ExecutorClient

type ExecutorServer

type ExecutorServer interface {
	// Healthcheck a module given by the location
	HealthCheck(*LoadRequest, Executor_HealthCheckServer) error
	// Plan out the execution of a module given by the location
	Plan(*LoadRequest, Executor_PlanServer) error
	// Apply a module given by the location
	Apply(*LoadRequest, Executor_ApplyServer) error
}

type Executor_ApplyClient

type Executor_ApplyClient interface {
	Recv() (*StatusResponse, error)
	grpc.ClientStream
}

type Executor_ApplyServer

type Executor_ApplyServer interface {
	Send(*StatusResponse) error
	grpc.ServerStream
}

type Executor_HealthCheckClient

type Executor_HealthCheckClient interface {
	Recv() (*StatusResponse, error)
	grpc.ClientStream
}

type Executor_HealthCheckServer

type Executor_HealthCheckServer interface {
	Send(*StatusResponse) error
	grpc.ServerStream
}

type Executor_PlanClient

type Executor_PlanClient interface {
	Recv() (*StatusResponse, error)
	grpc.ClientStream
}

type Executor_PlanServer

type Executor_PlanServer interface {
	Send(*StatusResponse) error
	grpc.ServerStream
}

type GraphComponent

type GraphComponent struct {
	// Types that are valid to be assigned to Component:
	//	*GraphComponent_Vertex_
	//	*GraphComponent_Edge_
	Component isGraphComponent_Component `protobuf_oneof:"component"`
}

func NewGraphComponent

func NewGraphComponent(component interface{}) *GraphComponent

NewGraphComponent wraps the given component in a GraphComponent wrapper. If the argument is not something that can be wrapped, GraphComponent will not contain anything.

func (*GraphComponent) Descriptor

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

func (*GraphComponent) GetComponent

func (m *GraphComponent) GetComponent() isGraphComponent_Component

func (*GraphComponent) GetEdge

func (m *GraphComponent) GetEdge() *GraphComponent_Edge

func (*GraphComponent) GetVertex

func (m *GraphComponent) GetVertex() *GraphComponent_Vertex

func (*GraphComponent) ProtoMessage

func (*GraphComponent) ProtoMessage()

func (*GraphComponent) Reset

func (m *GraphComponent) Reset()

func (*GraphComponent) String

func (m *GraphComponent) String() string

func (*GraphComponent) XXX_OneofFuncs

func (*GraphComponent) 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 GraphComponent_Edge

type GraphComponent_Edge struct {
	Source     string   `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"`
	Dest       string   `protobuf:"bytes,2,opt,name=dest" json:"dest,omitempty"`
	Attributes []string `protobuf:"bytes,3,rep,name=attributes" json:"attributes,omitempty"`
}

func (*GraphComponent_Edge) Descriptor

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

func (*GraphComponent_Edge) GetAttributes

func (m *GraphComponent_Edge) GetAttributes() []string

func (*GraphComponent_Edge) GetDest

func (m *GraphComponent_Edge) GetDest() string

func (*GraphComponent_Edge) GetSource

func (m *GraphComponent_Edge) GetSource() string

func (*GraphComponent_Edge) ProtoMessage

func (*GraphComponent_Edge) ProtoMessage()

func (*GraphComponent_Edge) Reset

func (m *GraphComponent_Edge) Reset()

func (*GraphComponent_Edge) String

func (m *GraphComponent_Edge) String() string

type GraphComponent_Edge_

type GraphComponent_Edge_ struct {
	Edge *GraphComponent_Edge `protobuf:"bytes,2,opt,name=edge,oneof"`
}

type GraphComponent_Vertex

type GraphComponent_Vertex struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// the kind of node, specified as the type used to create a node of this
	// type in the Converge DSL
	Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"`
	// detailed fields of this node, serialized as JSON
	Details []byte `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
}

func (*GraphComponent_Vertex) Descriptor

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

func (*GraphComponent_Vertex) GetDetails

func (m *GraphComponent_Vertex) GetDetails() []byte

func (*GraphComponent_Vertex) GetId

func (m *GraphComponent_Vertex) GetId() string

func (*GraphComponent_Vertex) GetKind

func (m *GraphComponent_Vertex) GetKind() string

func (*GraphComponent_Vertex) ProtoMessage

func (*GraphComponent_Vertex) ProtoMessage()

func (*GraphComponent_Vertex) Reset

func (m *GraphComponent_Vertex) Reset()

func (*GraphComponent_Vertex) String

func (m *GraphComponent_Vertex) String() string

type GraphComponent_Vertex_

type GraphComponent_Vertex_ struct {
	Vertex *GraphComponent_Vertex `protobuf:"bytes,1,opt,name=vertex,oneof"`
}

type GrapherClient

type GrapherClient interface {
	Graph(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (Grapher_GraphClient, error)
}

func NewGrapherClient

func NewGrapherClient(cc *grpc.ClientConn) GrapherClient

type GrapherServer

type GrapherServer interface {
	Graph(*LoadRequest, Grapher_GraphServer) error
}

type Grapher_GraphClient

type Grapher_GraphClient interface {
	Recv() (*GraphComponent, error)
	grpc.ClientStream
}

type Grapher_GraphServer

type Grapher_GraphServer interface {
	Send(*GraphComponent) error
	grpc.ServerStream
}

type InfoClient

type InfoClient interface {
	Ping(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
}

func NewInfoClient

func NewInfoClient(cc *grpc.ClientConn) InfoClient

type InfoServer

type InfoServer interface {
	Ping(context.Context, *google_protobuf1.Empty) (*google_protobuf1.Empty, error)
}

type LoadRequest

type LoadRequest struct {
	Location   string            `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
	Parameters map[string]string `` /* 140-byte string literal not displayed */
	Verify     bool              `protobuf:"varint,3,opt,name=verify" json:"verify,omitempty"`
}

func (*LoadRequest) Descriptor

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

func (*LoadRequest) GetLocation

func (m *LoadRequest) GetLocation() string

func (*LoadRequest) GetParameters

func (m *LoadRequest) GetParameters() map[string]string

func (*LoadRequest) GetVerify

func (m *LoadRequest) GetVerify() bool

func (*LoadRequest) Load

func (lr *LoadRequest) Load(ctx context.Context) (*graph.Graph, error)

Load gets a graph from a LocationRequest

func (*LoadRequest) ProtoMessage

func (*LoadRequest) ProtoMessage()

func (*LoadRequest) Reset

func (m *LoadRequest) Reset()

func (*LoadRequest) String

func (m *LoadRequest) String() string

type ResourceHostClient

type ResourceHostClient interface {
	// GetBinary returns the converge binary itself
	GetBinary(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ContentResponse, error)
	// GetModule gets the content of a module at the given path
	GetModule(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*ContentResponse, error)
}

func NewResourceHostClient

func NewResourceHostClient(cc *grpc.ClientConn) ResourceHostClient

type ResourceHostServer

type ResourceHostServer interface {
	// GetBinary returns the converge binary itself
	GetBinary(context.Context, *google_protobuf1.Empty) (*ContentResponse, error)
	// GetModule gets the content of a module at the given path
	GetModule(context.Context, *LoadRequest) (*ContentResponse, error)
}

type StatusResponse

type StatusResponse struct {
	// TODO: preserve for compat but will stop working in 0.4.0. This has moved to
	// meta.id
	Id      string                  `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Stage   StatusResponse_Stage    `protobuf:"varint,2,opt,name=stage,enum=pb.StatusResponse_Stage" json:"stage,omitempty"`
	Run     StatusResponse_Run      `protobuf:"varint,3,opt,name=run,enum=pb.StatusResponse_Run" json:"run,omitempty"`
	Details *StatusResponse_Details `protobuf:"bytes,4,opt,name=details" json:"details,omitempty"`
	Meta    *StatusResponse_Meta    `protobuf:"bytes,5,opt,name=meta" json:"meta,omitempty"`
}

func (*StatusResponse) Descriptor

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

func (*StatusResponse) GetDetails

func (m *StatusResponse) GetDetails() *StatusResponse_Details

func (*StatusResponse) GetId

func (m *StatusResponse) GetId() string

func (*StatusResponse) GetMeta

func (m *StatusResponse) GetMeta() *StatusResponse_Meta

func (*StatusResponse) GetRun

func (m *StatusResponse) GetRun() StatusResponse_Run

func (*StatusResponse) GetStage

func (m *StatusResponse) GetStage() StatusResponse_Stage

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) String

func (m *StatusResponse) String() string

type StatusResponse_Details

type StatusResponse_Details struct {
	Messages   []string                 `protobuf:"bytes,1,rep,name=messages" json:"messages,omitempty"`
	Changes    map[string]*DiffResponse `` /* 134-byte string literal not displayed */
	HasChanges bool                     `protobuf:"varint,3,opt,name=hasChanges" json:"hasChanges,omitempty"`
	Error      string                   `protobuf:"bytes,4,opt,name=error" json:"error,omitempty"`
	Warning    string                   `protobuf:"bytes,5,opt,name=warning" json:"warning,omitempty"`
}

the informational message, if present

func (*StatusResponse_Details) Descriptor

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

func (*StatusResponse_Details) GetChanges

func (m *StatusResponse_Details) GetChanges() map[string]*DiffResponse

func (*StatusResponse_Details) GetError

func (m *StatusResponse_Details) GetError() string

func (*StatusResponse_Details) GetHasChanges

func (m *StatusResponse_Details) GetHasChanges() bool

func (*StatusResponse_Details) GetMessages

func (m *StatusResponse_Details) GetMessages() []string

func (*StatusResponse_Details) ProtoMessage

func (*StatusResponse_Details) ProtoMessage()

func (*StatusResponse_Details) Reset

func (m *StatusResponse_Details) Reset()

func (*StatusResponse_Details) String

func (m *StatusResponse_Details) String() string

func (*StatusResponse_Details) ToPrintable

func (sr *StatusResponse_Details) ToPrintable() human.Printable

ToPrintable returns a view that can be used in a human printer

type StatusResponse_Meta

type StatusResponse_Meta struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func MetaFromNode

func MetaFromNode(meta *node.Node) *StatusResponse_Meta

MetaFromNode transfers metadata from a node to a Meta object

func (*StatusResponse_Meta) Descriptor

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

func (*StatusResponse_Meta) GetId

func (m *StatusResponse_Meta) GetId() string

func (*StatusResponse_Meta) ProtoMessage

func (*StatusResponse_Meta) ProtoMessage()

func (*StatusResponse_Meta) Reset

func (m *StatusResponse_Meta) Reset()

func (*StatusResponse_Meta) String

func (m *StatusResponse_Meta) String() string

type StatusResponse_Run

type StatusResponse_Run int32

when is this status response being sent?

const (
	StatusResponse_UNSPECIFIED_RUN StatusResponse_Run = 0
	StatusResponse_STARTED         StatusResponse_Run = 1
	StatusResponse_FINISHED        StatusResponse_Run = 2
)

func (StatusResponse_Run) EnumDescriptor

func (StatusResponse_Run) EnumDescriptor() ([]byte, []int)

func (StatusResponse_Run) String

func (x StatusResponse_Run) String() string

type StatusResponse_Stage

type StatusResponse_Stage int32

the stage from which this status response is being sent

const (
	StatusResponse_UNSPECIFIED_STAGE StatusResponse_Stage = 0
	StatusResponse_PLAN              StatusResponse_Stage = 1
	StatusResponse_APPLY             StatusResponse_Stage = 2
)

func (StatusResponse_Stage) EnumDescriptor

func (StatusResponse_Stage) EnumDescriptor() ([]byte, []int)

func (StatusResponse_Stage) String

func (x StatusResponse_Stage) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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