v1alpha1

package
v0.0.0-...-fba2ed5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package v1alpha1 is a generated protocol buffer package.

It is generated from these files:

operation.proto

It has these top-level messages:

Log
DescribeRequest
DescribeResponse
LogDescribeRequest
LogDescribeResponse
Auth
Metadata
Operation

Package v1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var OperationType_name = map[int32]string{
	0:  "UNKNOWN",
	1:  "CLUSTER_APPLY",
	11: "NAMESPACE_CREATE",
}
View Source
var OperationType_value = map[string]int32{
	"UNKNOWN":          0,
	"CLUSTER_APPLY":    1,
	"NAMESPACE_CREATE": 11,
}

Functions

func ExportOperationsCorsPatterns

func ExportOperationsCorsPatterns() []runtime.Pattern

ExportOperationsCorsPatterns returns an array of grpc gatway mux patterns for Operations service to enable CORS.

func RegisterOperationsHandler

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

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

func RegisterOperationsHandlerClient

func RegisterOperationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OperationsClient) error

RegisterOperationsHandler registers the http handlers for service Operations to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OperationsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OperationsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OperationsClient" to call the correct interceptors.

func RegisterOperationsHandlerFromEndpoint

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

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

func RegisterOperationsServer

func RegisterOperationsServer(s *grpc.Server, srv OperationsServer)

Types

type Auth

type Auth struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
	Secret    string `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"`
	AuthType  string `protobuf:"bytes,4,opt,name=auth_type,json=authType" json:"auth_type,omitempty"`
}

func (*Auth) Descriptor

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

func (*Auth) GetAuthType

func (m *Auth) GetAuthType() string

func (*Auth) GetNamespace

func (m *Auth) GetNamespace() string

func (*Auth) GetSecret

func (m *Auth) GetSecret() string

func (*Auth) GetUsername

func (m *Auth) GetUsername() string

func (*Auth) ProtoMessage

func (*Auth) ProtoMessage()

func (*Auth) Reset

func (m *Auth) Reset()

func (*Auth) String

func (m *Auth) String() string

type DescribeRequest

type DescribeRequest struct {
	Phid      string `protobuf:"bytes,1,opt,name=phid" json:"phid,omitempty"`
	Timestamp int64  `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
}

func (*DescribeRequest) Descriptor

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

func (*DescribeRequest) GetPhid

func (m *DescribeRequest) GetPhid() string

func (*DescribeRequest) GetTimestamp

func (m *DescribeRequest) GetTimestamp() int64

func (*DescribeRequest) IsRequest

func (m *DescribeRequest) IsRequest()

func (*DescribeRequest) ProtoMessage

func (*DescribeRequest) ProtoMessage()

func (*DescribeRequest) Reset

func (m *DescribeRequest) Reset()

func (*DescribeRequest) String

func (m *DescribeRequest) String() string

func (*DescribeRequest) Valid

func (m *DescribeRequest) Valid() (*gojsonschema.Result, error)

type DescribeResponse

type DescribeResponse struct {
	Op   *Operation `protobuf:"bytes,1,opt,name=op" json:"op,omitempty"`
	Logs []*Log     `protobuf:"bytes,2,rep,name=logs" json:"logs,omitempty"`
}

func (*DescribeResponse) Descriptor

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

func (*DescribeResponse) GetLogs

func (m *DescribeResponse) GetLogs() []*Log

func (*DescribeResponse) GetOp

func (m *DescribeResponse) GetOp() *Operation

func (*DescribeResponse) ProtoMessage

func (*DescribeResponse) ProtoMessage()

func (*DescribeResponse) Reset

func (m *DescribeResponse) Reset()

func (*DescribeResponse) String

func (m *DescribeResponse) String() string

type Log

type Log struct {
	Id        string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Timestamp int64  `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
	Message   string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
}

func (*Log) Descriptor

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

func (*Log) GetId

func (m *Log) GetId() string

func (*Log) GetMessage

func (m *Log) GetMessage() string

func (*Log) GetTimestamp

func (m *Log) GetTimestamp() int64

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) Reset

func (m *Log) Reset()

func (*Log) String

func (m *Log) String() string

type LogDescribeRequest

type LogDescribeRequest struct {
	Phid  string `protobuf:"bytes,1,opt,name=phid" json:"phid,omitempty"`
	LogId string `protobuf:"bytes,2,opt,name=log_id,json=logId" json:"log_id,omitempty"`
}

func (*LogDescribeRequest) Descriptor

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

func (*LogDescribeRequest) GetLogId

func (m *LogDescribeRequest) GetLogId() string

func (*LogDescribeRequest) GetPhid

func (m *LogDescribeRequest) GetPhid() string

func (*LogDescribeRequest) IsRequest

func (m *LogDescribeRequest) IsRequest()

func (*LogDescribeRequest) ProtoMessage

func (*LogDescribeRequest) ProtoMessage()

func (*LogDescribeRequest) Reset

func (m *LogDescribeRequest) Reset()

func (*LogDescribeRequest) String

func (m *LogDescribeRequest) String() string

func (*LogDescribeRequest) Valid

type LogDescribeResponse

type LogDescribeResponse struct {
	Log *Log `protobuf:"bytes,1,opt,name=log" json:"log,omitempty"`
}

func (*LogDescribeResponse) Descriptor

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

func (*LogDescribeResponse) GetLog

func (m *LogDescribeResponse) GetLog() *Log

func (*LogDescribeResponse) ProtoMessage

func (*LogDescribeResponse) ProtoMessage()

func (*LogDescribeResponse) Reset

func (m *LogDescribeResponse) Reset()

func (*LogDescribeResponse) String

func (m *LogDescribeResponse) String() string

type Metadata

type Metadata struct {
	// Contains PurchasePHID is this is a purchase request.
	PurchasePhids []string `protobuf:"bytes,1,rep,name=purchase_phids,json=purchasePhids" json:"purchase_phids,omitempty"`
	// PHID of the user who requested this operation.
	AuthorPhid string `protobuf:"bytes,2,opt,name=author_phid,json=authorPhid" json:"author_phid,omitempty"`
	AuthorName string `protobuf:"bytes,3,opt,name=author_name,json=authorName" json:"author_name,omitempty"`
}

Metadata holds other on request or operation specific data that could be used inside that operation. An welldefined message instead of a map is used so that the data fields can be explicitly defined with its own data type. Resolves data convertions.

func (*Metadata) Descriptor

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

func (*Metadata) GetAuthorName

func (m *Metadata) GetAuthorName() string

func (*Metadata) GetAuthorPhid

func (m *Metadata) GetAuthorPhid() string

func (*Metadata) GetPurchasePhids

func (m *Metadata) GetPurchasePhids() []string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

type Operation

type Operation struct {
	// Types that are valid to be assigned to Request:
	//	*Operation_ClusterApplyRequest
	//	*Operation_NamespaceCreateRequest
	Request  isOperation_Request `protobuf_oneof:"request"`
	Type     OperationType       `protobuf:"varint,14,opt,name=type,enum=appscode.operation.v1alpha1.OperationType" json:"type,omitempty"`
	Phid     string              `protobuf:"bytes,15,opt,name=phid" json:"phid,omitempty"`
	Auth     *Auth               `protobuf:"bytes,16,opt,name=auth" json:"auth,omitempty"`
	Metadata *Metadata           `protobuf:"bytes,17,opt,name=metadata" json:"metadata,omitempty"`
}

Next Id: 22

func (*Operation) Descriptor

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

func (*Operation) GetAuth

func (m *Operation) GetAuth() *Auth

func (*Operation) GetClusterApplyRequest

func (m *Operation) GetClusterApplyRequest() *appscode_cloud_v1alpha1.ClusterApplyRequest

func (*Operation) GetMetadata

func (m *Operation) GetMetadata() *Metadata

func (*Operation) GetNamespaceCreateRequest

func (m *Operation) GetNamespaceCreateRequest() *appscode_namespace_v1alpha1.CreateRequest

func (*Operation) GetPhid

func (m *Operation) GetPhid() string

func (*Operation) GetRequest

func (m *Operation) GetRequest() isOperation_Request

func (*Operation) GetType

func (m *Operation) GetType() OperationType

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) String

func (m *Operation) String() string

func (*Operation) XXX_OneofFuncs

func (*Operation) 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 OperationType

type OperationType int32

Next Id: 18

const (
	OperationType_UNKNOWN          OperationType = 0
	OperationType_CLUSTER_APPLY    OperationType = 1
	OperationType_NAMESPACE_CREATE OperationType = 11
)

func (OperationType) EnumDescriptor

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

func (OperationType) String

func (x OperationType) String() string

type Operation_ClusterApplyRequest

type Operation_ClusterApplyRequest struct {
	ClusterApplyRequest *appscode_cloud_v1alpha1.ClusterApplyRequest `protobuf:"bytes,1,opt,name=cluster_apply_request,json=clusterApplyRequest,oneof"`
}

type Operation_NamespaceCreateRequest

type Operation_NamespaceCreateRequest struct {
	NamespaceCreateRequest *appscode_namespace_v1alpha1.CreateRequest `protobuf:"bytes,11,opt,name=namespace_create_request,json=namespaceCreateRequest,oneof"`
}

type OperationsClient

type OperationsClient interface {
	Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error)
	DescribeLog(ctx context.Context, in *LogDescribeRequest, opts ...grpc.CallOption) (*LogDescribeResponse, error)
}

func NewOperationsClient

func NewOperationsClient(cc *grpc.ClientConn) OperationsClient

type OperationsServer

type OperationsServer interface {
	Describe(context.Context, *DescribeRequest) (*DescribeResponse, error)
	DescribeLog(context.Context, *LogDescribeRequest) (*LogDescribeResponse, error)
}

Jump to

Keyboard shortcuts

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