Documentation
¶
Overview ¶
Package protocolclient is the curated public facade for Harbor's authenticated Go Protocol client.
Index ¶
- Constants
- Variables
- type ArtifactsListRequest
- type ArtifactsListResponse
- type ArtifactsPutRequest
- type ArtifactsPutResponse
- type Client
- type Connection
- type ControlRequest
- type ControlResponse
- type Error
- type ErrorCode
- type EventStream
- type IdentityScope
- type Method
- type Option
- type PauseListRequest
- type PauseListResponse
- type RuntimeHealth
- type RuntimeInfo
- type SSEFrame
- type SessionsDeleteResponse
- type SessionsInspectRequest
- type SessionsInspectResponse
- type SessionsListRequest
- type SessionsListResponse
- type SessionsSetTitleRequest
- type SessionsSetTitleResponse
- type StartRequest
- type StartResponse
- type StateHistoryRequest
- type StateHistoryResponse
- type StreamOptions
- type TaskDetail
- type TaskGetRequest
- type TaskListRequest
- type TaskListResponse
- type TokenSource
- type TokenSourceFunc
Constants ¶
const ( // ProtocolVersion is the pinned Harbor Protocol version. ProtocolVersion = types.ProtocolVersion // MethodCancel cancels a run. MethodCancel = methods.MethodCancel // MethodPause pauses a run. MethodPause = methods.MethodPause // MethodResume resumes a run. MethodResume = methods.MethodResume // MethodRedirect redirects a run. MethodRedirect = methods.MethodRedirect // MethodInjectContext injects context into a run. MethodInjectContext = methods.MethodInjectContext // MethodApprove approves a paused operation. MethodApprove = methods.MethodApprove // MethodReject rejects a paused operation. MethodReject = methods.MethodReject // MethodPrioritize changes task priority. MethodPrioritize = methods.MethodPrioritize // MethodUserMessage injects a user message. MethodUserMessage = methods.MethodUserMessage )
Variables ¶
var ( // ErrInvalidConnection reports invalid construction inputs. ErrInvalidConnection = internal.ErrInvalidConnection // ErrTokenRequired reports an empty token result. ErrTokenRequired = internal.ErrTokenRequired // ErrTokenIdentityMismatch reports static-token use for another principal. ErrTokenIdentityMismatch = internal.ErrTokenIdentityMismatch // ErrIdentityRequired reports an incomplete isolation identity. ErrIdentityRequired = internal.ErrIdentityRequired // ErrResponseTooLarge reports a bounded-body violation. ErrResponseTooLarge = internal.ErrResponseTooLarge // ErrMalformedResponse reports strict JSON failure. ErrMalformedResponse = internal.ErrMalformedResponse // ErrIncompatibleProtocol reports a Protocol-major mismatch. ErrIncompatibleProtocol = internal.ErrIncompatibleProtocol // ErrMalformedSSE reports invalid event-stream framing. ErrMalformedSSE = internal.ErrMalformedSSE // ErrSSELineTooLarge reports a line bound violation. ErrSSELineTooLarge = internal.ErrSSELineTooLarge // ErrSSEFrameTooLarge reports a frame bound violation. ErrSSEFrameTooLarge = internal.ErrSSEFrameTooLarge // ErrStreamClosed reports receive after explicit close. ErrStreamClosed = internal.ErrStreamClosed )
Functions ¶
This section is empty.
Types ¶
type ArtifactsListRequest ¶
type ArtifactsListRequest = types.ArtifactsListRequest
ArtifactsListRequest is the artifacts.list request.
type ArtifactsListResponse ¶
type ArtifactsListResponse = types.ArtifactsListResponse
ArtifactsListResponse is the artifacts.list response.
type ArtifactsPutRequest ¶
type ArtifactsPutRequest = types.ArtifactsPutRequest
ArtifactsPutRequest is the artifacts.put request.
type ArtifactsPutResponse ¶
type ArtifactsPutResponse = types.ArtifactsPutResponse
ArtifactsPutResponse is the artifacts.put response.
type Connection ¶
type Connection = internal.Connection
Connection describes one authenticated Runtime attachment.
type ControlRequest ¶
type ControlRequest = types.ControlRequest
ControlRequest is the shared steering-control request.
type ControlResponse ¶
type ControlResponse = types.ControlResponse
ControlResponse is the shared steering-control response.
type Error ¶
type Error = internal.ProtocolError
Error is a typed HTTP plus canonical Protocol failure.
type ErrorCode ¶
type ErrorCode = protoerrors.Code
ErrorCode is a canonical Harbor Protocol error code.
type EventStream ¶
type EventStream = internal.EventStream
EventStream owns one cancellable event subscription.
type IdentityScope ¶
type IdentityScope = types.IdentityScope
IdentityScope is the Protocol wire identity tuple.
type Option ¶
Option configures a Client at construction.
func WithHTTPClient ¶
WithHTTPClient supplies the HTTP client used for REST and SSE calls.
type PauseListRequest ¶
type PauseListRequest = types.PauseListRequest
PauseListRequest is the pause.list request.
type PauseListResponse ¶
type PauseListResponse = types.PauseListResponse
PauseListResponse is the pause.list response.
type RuntimeHealth ¶
type RuntimeHealth = types.RuntimeHealth
RuntimeHealth is the runtime.health response.
type SessionsDeleteResponse ¶
type SessionsDeleteResponse = types.SessionsDeleteResponse
SessionsDeleteResponse is the sessions.delete response.
type SessionsInspectRequest ¶
type SessionsInspectRequest = types.SessionsInspectRequest
SessionsInspectRequest is the sessions.inspect request.
type SessionsInspectResponse ¶
type SessionsInspectResponse = types.SessionsInspectResponse
SessionsInspectResponse is the sessions.inspect response.
type SessionsListRequest ¶
type SessionsListRequest = types.SessionsListRequest
SessionsListRequest is the sessions.list request.
type SessionsListResponse ¶
type SessionsListResponse = types.SessionsListResponse
SessionsListResponse is the sessions.list response.
type SessionsSetTitleRequest ¶
type SessionsSetTitleRequest = types.SessionsSetTitleRequest
SessionsSetTitleRequest is the sessions.set_title request.
type SessionsSetTitleResponse ¶
type SessionsSetTitleResponse = types.SessionsSetTitleResponse
SessionsSetTitleResponse is the sessions.set_title response.
type StateHistoryRequest ¶
type StateHistoryRequest = types.StateHistoryRequest
StateHistoryRequest is the state.history request.
type StateHistoryResponse ¶
type StateHistoryResponse = types.StateHistoryResponse
StateHistoryResponse is the state.history response.
type StreamOptions ¶
type StreamOptions = internal.StreamOptions
StreamOptions selects an event subscription and reconnect cursor.
type TaskGetRequest ¶
type TaskGetRequest = types.TaskGetRequest
TaskGetRequest is the tasks.get request.
type TaskListRequest ¶
type TaskListRequest = types.TaskListRequest
TaskListRequest is the tasks.list request.
type TaskListResponse ¶
type TaskListResponse = types.TaskListResponse
TaskListResponse is the tasks.list response.
type TokenSource ¶
type TokenSource = internal.TokenSource
TokenSource resolves a bearer token for each request.
func StaticToken ¶
func StaticToken(token string, principal IdentityScope) TokenSource
StaticToken returns a fixed TokenSource bound to principal.
type TokenSourceFunc ¶
type TokenSourceFunc = internal.TokenSourceFunc
TokenSourceFunc adapts a function to TokenSource.