client

package
v0.0.0-...-4b2b8ef Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeToken    = "token"
	KeyringRefPrefix = "keyring://construct/"
)

Variables

This section is empty.

Functions

func Ptr

func Ptr[T any](v T) *T

Types

type AuthConfig

type AuthConfig struct {
	Type     string `yaml:"type,omitempty"`
	Token    string `yaml:"token,omitempty"`
	TokenRef string `yaml:"token-ref,omitempty"`
}

func (*AuthConfig) IsConfigured

func (a *AuthConfig) IsConfigured() bool

func (*AuthConfig) KeyringKey

func (a *AuthConfig) KeyringKey() string

func (*AuthConfig) Validate

func (a *AuthConfig) Validate() error

type Client

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

func NewClient

func NewClient(endpointContext EndpointContext, options ...ClientOption) (*Client, error)

func (*Client) Agent

func (c *Client) Agent() v1connect.AgentServiceClient

func (*Client) Auth

func (*Client) Event

func (c *Client) Event() v1connect.EventServiceClient

func (*Client) Message

func (c *Client) Message() v1connect.MessageServiceClient

func (*Client) Model

func (c *Client) Model() v1connect.ModelServiceClient

func (*Client) ModelProvider

func (c *Client) ModelProvider() v1connect.ModelProviderServiceClient

func (*Client) Skill

func (c *Client) Skill() v1connect.SkillServiceClient

func (*Client) Task

type ClientOption

type ClientOption func(*ClientOptions)

func WithAuthToken

func WithAuthToken(token string) ClientOption

func WithConnectOptions

func WithConnectOptions(options ...connect.ClientOption) ClientOption

func WithHTTPClient

func WithHTTPClient(client *http.Client) ClientOption

type ClientOptions

type ClientOptions struct {
	HTTPClient     *http.Client
	ConnectOptions []connect.ClientOption
}

type EndpointContext

type EndpointContext struct {
	Address string      `yaml:"address"`
	Kind    string      `yaml:"kind"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
}

func (*EndpointContext) Validate

func (c *EndpointContext) Validate() error

type EndpointContexts

type EndpointContexts struct {
	CurrentContext  string                     `yaml:"current"`
	PreviousContext string                     `yaml:"previous"`
	Contexts        map[string]EndpointContext `yaml:"contexts"`
}

func (*EndpointContexts) Current

func (c *EndpointContexts) Current() (EndpointContext, bool)

func (*EndpointContexts) SetCurrent

func (c *EndpointContexts) SetCurrent(contextName string) error

func (*EndpointContexts) SetPrevious

func (c *EndpointContexts) SetPrevious(contextName string) error

func (*EndpointContexts) Validate

func (c *EndpointContexts) Validate() error

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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