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 ¶
- Variables
- func ExportOperationsCorsPatterns() []runtime.Pattern
- func RegisterOperationsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOperationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OperationsClient) error
- func RegisterOperationsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOperationsServer(s *grpc.Server, srv OperationsServer)
- type Auth
- type DescribeRequest
- func (*DescribeRequest) Descriptor() ([]byte, []int)
- func (m *DescribeRequest) GetPhid() string
- func (m *DescribeRequest) GetTimestamp() int64
- func (m *DescribeRequest) IsRequest()
- func (*DescribeRequest) ProtoMessage()
- func (m *DescribeRequest) Reset()
- func (m *DescribeRequest) String() string
- func (m *DescribeRequest) Valid() (*gojsonschema.Result, error)
- type DescribeResponse
- type Log
- type LogDescribeRequest
- func (*LogDescribeRequest) Descriptor() ([]byte, []int)
- func (m *LogDescribeRequest) GetLogId() string
- func (m *LogDescribeRequest) GetPhid() string
- func (m *LogDescribeRequest) IsRequest()
- func (*LogDescribeRequest) ProtoMessage()
- func (m *LogDescribeRequest) Reset()
- func (m *LogDescribeRequest) String() string
- func (m *LogDescribeRequest) Valid() (*gojsonschema.Result, error)
- type LogDescribeResponse
- type Metadata
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)
- func (m *Operation) GetAuth() *Auth
- func (m *Operation) GetClusterApplyRequest() *appscode_cloud_v1alpha1.ClusterApplyRequest
- func (m *Operation) GetMetadata() *Metadata
- func (m *Operation) GetNamespaceCreateRequest() *appscode_namespace_v1alpha1.CreateRequest
- func (m *Operation) GetPhid() string
- func (m *Operation) GetRequest() isOperation_Request
- func (m *Operation) GetType() OperationType
- func (*Operation) ProtoMessage()
- func (m *Operation) Reset()
- func (m *Operation) String() string
- func (*Operation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type OperationType
- type Operation_ClusterApplyRequest
- type Operation_NamespaceCreateRequest
- type OperationsClient
- type OperationsServer
Constants ¶
This section is empty.
Variables ¶
var OperationType_name = map[int32]string{
0: "UNKNOWN",
1: "CLUSTER_APPLY",
11: "NAMESPACE_CREATE",
}
var OperationType_value = map[string]int32{
"UNKNOWN": 0,
"CLUSTER_APPLY": 1,
"NAMESPACE_CREATE": 11,
}
Functions ¶
func ExportOperationsCorsPatterns ¶
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) GetAuthType ¶
func (*Auth) GetNamespace ¶
func (*Auth) GetUsername ¶
func (*Auth) ProtoMessage ¶
func (*Auth) ProtoMessage()
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) GetMessage ¶
func (*Log) GetTimestamp ¶
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
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 ¶
func (m *LogDescribeRequest) Valid() (*gojsonschema.Result, error)
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) GetAuthorName ¶
func (*Metadata) GetAuthorPhid ¶
func (*Metadata) GetPurchasePhids ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
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) GetClusterApplyRequest ¶
func (m *Operation) GetClusterApplyRequest() *appscode_cloud_v1alpha1.ClusterApplyRequest
func (*Operation) GetMetadata ¶
func (*Operation) GetNamespaceCreateRequest ¶
func (m *Operation) GetNamespaceCreateRequest() *appscode_namespace_v1alpha1.CreateRequest
func (*Operation) GetRequest ¶
func (m *Operation) GetRequest() isOperation_Request
func (*Operation) GetType ¶
func (m *Operation) GetType() OperationType
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
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) }