protocolclient

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package protocolclient is the curated public facade for Harbor's authenticated Go Protocol client.

Index

Constants

View Source
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

View Source
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 Client

type Client = internal.Client

Client is the curated concurrent-safe REST/SSE Protocol client interface.

func New

func New(connection Connection, options ...Option) (Client, error)

New constructs a Protocol client.

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 Method

type Method = methods.Method

Method is a canonical Harbor Protocol method name.

type Option

type Option = internal.Option

Option configures a Client at construction.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

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 RuntimeInfo

type RuntimeInfo = types.RuntimeInfo

RuntimeInfo is the runtime.info response.

type SSEFrame

type SSEFrame = internal.SSEFrame

SSEFrame is one decoded Server-Sent Events frame.

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 StartRequest

type StartRequest = types.StartRequest

StartRequest is the start request.

type StartResponse

type StartResponse = types.StartResponse

StartResponse is the start 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 TaskDetail

type TaskDetail = types.TaskDetail

TaskDetail is the tasks.get response.

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.

Jump to

Keyboard shortcuts

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