admin

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package admin is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	API_InspectCluster_FullMethodName = "/admin_v2.API/InspectCluster"
)

Variables

View Source
var API_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin_v2.API",
	HandlerType: (*APIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InspectCluster",
			Handler:    _API_InspectCluster_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/admin.proto",
}

API_ServiceDesc is the grpc.ServiceDesc for API service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_admin_admin_proto protoreflect.FileDescriptor

Functions

func RegisterAPIHandler added in v2.8.0

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

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

func RegisterAPIHandlerClient added in v2.8.0

func RegisterAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client APIClient) error

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

func RegisterAPIHandlerFromEndpoint added in v2.8.0

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

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

func RegisterAPIHandlerServer added in v2.8.0

func RegisterAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server APIServer) error

RegisterAPIHandlerServer registers the http handlers for service API to "mux". UnaryRPC :call APIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAPIHandlerFromEndpoint instead.

func RegisterAPIServer

func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)

Types

type APIClient

type APIClient interface {
	InspectCluster(ctx context.Context, in *InspectClusterRequest, opts ...grpc.CallOption) (*ClusterInfo, error)
}

APIClient is the client API for API service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAPIClient

func NewAPIClient(cc grpc.ClientConnInterface) APIClient

type APIServer

type APIServer interface {
	InspectCluster(context.Context, *InspectClusterRequest) (*ClusterInfo, error)
	// contains filtered or unexported methods
}

APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility

type ClusterInfo

type ClusterInfo struct {
	Id           string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	DeploymentId string `protobuf:"bytes,2,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"`
	// True if the server is capable of generating warnings.
	WarningsOk bool `protobuf:"varint,3,opt,name=warnings_ok,json=warningsOk,proto3" json:"warnings_ok,omitempty"`
	// Warnings about the client configuration.
	Warnings []string `protobuf:"bytes,4,rep,name=warnings,proto3" json:"warnings,omitempty"`
	// The configured public URL of Pachyderm.
	ProxyHost string `protobuf:"bytes,5,opt,name=proxy_host,json=proxyHost,proto3" json:"proxy_host,omitempty"`
	// True if Pachyderm is served over TLS (HTTPS).
	ProxyTls bool `protobuf:"varint,6,opt,name=proxy_tls,json=proxyTls,proto3" json:"proxy_tls,omitempty"`
	// True if this pachd is in "paused" mode.
	Paused bool `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"`
	// Any HTTP links that the client might want to be aware of.
	WebResources *WebResource `protobuf:"bytes,8,opt,name=web_resources,json=webResources,proto3" json:"web_resources,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterInfo) Descriptor deprecated

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

Deprecated: Use ClusterInfo.ProtoReflect.Descriptor instead.

func (*ClusterInfo) GetDeploymentId added in v2.7.0

func (x *ClusterInfo) GetDeploymentId() string

func (*ClusterInfo) GetId added in v2.7.0

func (x *ClusterInfo) GetId() string

func (*ClusterInfo) GetPaused added in v2.8.0

func (x *ClusterInfo) GetPaused() bool

func (*ClusterInfo) GetProxyHost added in v2.6.1

func (x *ClusterInfo) GetProxyHost() string

func (*ClusterInfo) GetProxyTls added in v2.6.1

func (x *ClusterInfo) GetProxyTls() bool

func (*ClusterInfo) GetWarnings added in v2.8.0

func (x *ClusterInfo) GetWarnings() []string

func (*ClusterInfo) GetWarningsOk added in v2.8.0

func (x *ClusterInfo) GetWarningsOk() bool

func (*ClusterInfo) GetWebResources added in v2.8.0

func (x *ClusterInfo) GetWebResources() *WebResource

func (*ClusterInfo) MarshalLogObject

func (x *ClusterInfo) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*ClusterInfo) ProtoMessage

func (*ClusterInfo) ProtoMessage()

func (*ClusterInfo) ProtoReflect added in v2.7.0

func (x *ClusterInfo) ProtoReflect() protoreflect.Message

func (*ClusterInfo) Reset

func (x *ClusterInfo) Reset()

func (*ClusterInfo) String

func (x *ClusterInfo) String() string

func (*ClusterInfo) Validate added in v2.8.0

func (m *ClusterInfo) Validate() error

Validate checks the field values on ClusterInfo with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ClusterInfo) ValidateAll added in v2.8.0

func (m *ClusterInfo) ValidateAll() error

ValidateAll checks the field values on ClusterInfo with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ClusterInfoMultiError, or nil if none found.

type ClusterInfoMultiError added in v2.8.0

type ClusterInfoMultiError []error

ClusterInfoMultiError is an error wrapping multiple validation errors returned by ClusterInfo.ValidateAll() if the designated constraints aren't met.

func (ClusterInfoMultiError) AllErrors added in v2.8.0

func (m ClusterInfoMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ClusterInfoMultiError) Error added in v2.8.0

func (m ClusterInfoMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ClusterInfoValidationError added in v2.8.0

type ClusterInfoValidationError struct {
	// contains filtered or unexported fields
}

ClusterInfoValidationError is the validation error returned by ClusterInfo.Validate if the designated constraints aren't met.

func (ClusterInfoValidationError) Cause added in v2.8.0

Cause function returns cause value.

func (ClusterInfoValidationError) Error added in v2.8.0

Error satisfies the builtin error interface

func (ClusterInfoValidationError) ErrorName added in v2.8.0

func (e ClusterInfoValidationError) ErrorName() string

ErrorName returns error name.

func (ClusterInfoValidationError) Field added in v2.8.0

Field function returns field value.

func (ClusterInfoValidationError) Key added in v2.8.0

Key function returns key value.

func (ClusterInfoValidationError) Reason added in v2.8.0

Reason function returns reason value.

type InspectClusterRequest

type InspectClusterRequest struct {

	// The version of the client that's connecting; used by the server to warn about too-old (or
	// too-new!) clients.
	ClientVersion *versionpb.Version `protobuf:"bytes,1,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
	// If CurrentProject is set, then InspectCluster will return an error if the
	// project does not exist.
	CurrentProject *pfs.Project `protobuf:"bytes,2,opt,name=current_project,json=currentProject,proto3" json:"current_project,omitempty"`
	// contains filtered or unexported fields
}

func (*InspectClusterRequest) Descriptor deprecated

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

Deprecated: Use InspectClusterRequest.ProtoReflect.Descriptor instead.

func (*InspectClusterRequest) GetClientVersion

func (x *InspectClusterRequest) GetClientVersion() *versionpb.Version

func (*InspectClusterRequest) GetCurrentProject added in v2.7.0

func (x *InspectClusterRequest) GetCurrentProject() *pfs.Project

func (*InspectClusterRequest) MarshalLogObject

func (x *InspectClusterRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*InspectClusterRequest) ProtoMessage

func (*InspectClusterRequest) ProtoMessage()

func (*InspectClusterRequest) ProtoReflect added in v2.7.0

func (x *InspectClusterRequest) ProtoReflect() protoreflect.Message

func (*InspectClusterRequest) Reset

func (x *InspectClusterRequest) Reset()

func (*InspectClusterRequest) String

func (x *InspectClusterRequest) String() string

func (*InspectClusterRequest) Validate added in v2.8.0

func (m *InspectClusterRequest) Validate() error

Validate checks the field values on InspectClusterRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*InspectClusterRequest) ValidateAll added in v2.8.0

func (m *InspectClusterRequest) ValidateAll() error

ValidateAll checks the field values on InspectClusterRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InspectClusterRequestMultiError, or nil if none found.

type InspectClusterRequestMultiError added in v2.8.0

type InspectClusterRequestMultiError []error

InspectClusterRequestMultiError is an error wrapping multiple validation errors returned by InspectClusterRequest.ValidateAll() if the designated constraints aren't met.

func (InspectClusterRequestMultiError) AllErrors added in v2.8.0

func (m InspectClusterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (InspectClusterRequestMultiError) Error added in v2.8.0

Error returns a concatenation of all the error messages it wraps.

type InspectClusterRequestValidationError added in v2.8.0

type InspectClusterRequestValidationError struct {
	// contains filtered or unexported fields
}

InspectClusterRequestValidationError is the validation error returned by InspectClusterRequest.Validate if the designated constraints aren't met.

func (InspectClusterRequestValidationError) Cause added in v2.8.0

Cause function returns cause value.

func (InspectClusterRequestValidationError) Error added in v2.8.0

Error satisfies the builtin error interface

func (InspectClusterRequestValidationError) ErrorName added in v2.8.0

ErrorName returns error name.

func (InspectClusterRequestValidationError) Field added in v2.8.0

Field function returns field value.

func (InspectClusterRequestValidationError) Key added in v2.8.0

Key function returns key value.

func (InspectClusterRequestValidationError) Reason added in v2.8.0

Reason function returns reason value.

type UnimplementedAPIServer

type UnimplementedAPIServer struct {
}

UnimplementedAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedAPIServer) InspectCluster

type UnsafeAPIServer added in v2.7.0

type UnsafeAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIServer will result in compilation errors.

type WebResource added in v2.8.0

type WebResource struct {

	// The base URL of the archive server; append a filename to this.  Empty if the archive server is
	// not exposed.
	ArchiveDownloadBaseUrl string `` /* 131-byte string literal not displayed */
	// Where to find the CreatePipelineRequest JSON schema; if this server is not accessible via a
	// URL, then a link to Github is provided based on the baked-in version of the server.
	CreatePipelineRequestJsonSchemaUrl string `` /* 171-byte string literal not displayed */
	// contains filtered or unexported fields
}

WebResource contains URL prefixes of common HTTP functions.

func (*WebResource) Descriptor deprecated added in v2.8.0

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

Deprecated: Use WebResource.ProtoReflect.Descriptor instead.

func (*WebResource) GetArchiveDownloadBaseUrl added in v2.8.0

func (x *WebResource) GetArchiveDownloadBaseUrl() string

func (*WebResource) GetCreatePipelineRequestJsonSchemaUrl added in v2.8.0

func (x *WebResource) GetCreatePipelineRequestJsonSchemaUrl() string

func (*WebResource) MarshalLogObject added in v2.8.0

func (x *WebResource) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*WebResource) ProtoMessage added in v2.8.0

func (*WebResource) ProtoMessage()

func (*WebResource) ProtoReflect added in v2.8.0

func (x *WebResource) ProtoReflect() protoreflect.Message

func (*WebResource) Reset added in v2.8.0

func (x *WebResource) Reset()

func (*WebResource) String added in v2.8.0

func (x *WebResource) String() string

func (*WebResource) Validate added in v2.8.0

func (m *WebResource) Validate() error

Validate checks the field values on WebResource with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*WebResource) ValidateAll added in v2.8.0

func (m *WebResource) ValidateAll() error

ValidateAll checks the field values on WebResource with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WebResourceMultiError, or nil if none found.

type WebResourceMultiError added in v2.8.0

type WebResourceMultiError []error

WebResourceMultiError is an error wrapping multiple validation errors returned by WebResource.ValidateAll() if the designated constraints aren't met.

func (WebResourceMultiError) AllErrors added in v2.8.0

func (m WebResourceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WebResourceMultiError) Error added in v2.8.0

func (m WebResourceMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type WebResourceValidationError added in v2.8.0

type WebResourceValidationError struct {
	// contains filtered or unexported fields
}

WebResourceValidationError is the validation error returned by WebResource.Validate if the designated constraints aren't met.

func (WebResourceValidationError) Cause added in v2.8.0

Cause function returns cause value.

func (WebResourceValidationError) Error added in v2.8.0

Error satisfies the builtin error interface

func (WebResourceValidationError) ErrorName added in v2.8.0

func (e WebResourceValidationError) ErrorName() string

ErrorName returns error name.

func (WebResourceValidationError) Field added in v2.8.0

Field function returns field value.

func (WebResourceValidationError) Key added in v2.8.0

Key function returns key value.

func (WebResourceValidationError) Reason added in v2.8.0

Reason function returns reason value.

Jump to

Keyboard shortcuts

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