Documentation
¶
Index ¶
- Constants
- Variables
- func RepositoryEndpoint(provider, endpoint string) bool
- type CatalogItem
- type CatalogRequest
- type CatalogSettings
- type Cataloger
- type Connection
- type CreateRequest
- type InUseError
- type PlatformApp
- type PrivateProber
- type ProbeAuthorization
- type ProbeCall
- type ProbeResult
- type Prober
- type Resolved
- type Route
- type RunnerCheck
- type Service
- func (s *Service) Create(ctx context.Context, session auth.Session, orgID string, r CreateRequest, ...) (Connection, error)
- func (s *Service) CreateManagedTx(ctx context.Context, tx pgx.Tx, a domain.Actor, c *Connection, ...) error
- func (s *Service) Delete(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) error
- func (s *Service) Get(ctx context.Context, session auth.Session, orgID, id string) (Connection, error)
- func (s *Service) List(ctx context.Context, session auth.Session, orgID, kind string, limit int, ...) (domain.Page[Connection], error)
- func (s *Service) MetadataTx(ctx context.Context, tx pgx.Tx, orgID, id string) (Connection, error)
- func (s *Service) ModelCatalog(ctx context.Context, session auth.Session, orgID string, r CatalogRequest) ([]CatalogItem, error)
- func (s *Service) Register(kind, provider string, probe Prober)
- func (s *Service) RegisterCatalog(catalog Cataloger)
- func (s *Service) RegisterPrivateProbe(probe PrivateProber)
- func (s *Service) RegisterRunnerCheck(check RunnerCheck)
- func (s *Service) ResolveTx(ctx context.Context, tx pgx.Tx, orgID, id, runnerID string) (Resolved, error)
- func (s *Service) Revoke(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) (Connection, error)
- func (s *Service) Rewrap(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) (Connection, error)
- func (s *Service) Rotate(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) (Connection, error)
- func (s *Service) SetPlatformApp(app PlatformApp)
- func (s *Service) SetRoute(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) (Connection, error)
- func (s *Service) Test(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) (Connection, error)
- func (s *Service) Update(ctx context.Context, session auth.Session, orgID, id string, expected int64, ...) (Connection, error)
- type Settings
Constants ¶
View Source
const GitHubAPI = "https://api.github.com"
View Source
const PlatformAuthKind = "github_app_platform"
Variables ¶
View Source
var ErrInUse = errors.New("connection is in use")
View Source
var ErrManaged = errors.New("connection is managed by a GitHub App setup")
View Source
var ErrRepositoryEndpoint = errors.New("API address is a repository URL")
View Source
var ErrRevoked = errors.New("connection revoked")
View Source
var ErrRunnerRequired = errors.New("enrol a runner in this organisation before approving a private route")
Functions ¶
func RepositoryEndpoint ¶
Types ¶
type CatalogItem ¶
type CatalogRequest ¶
type CatalogRequest struct {
Provider string `json:"provider"`
Endpoint string `json:"endpoint"`
Secret string `json:"secret"`
Settings CatalogSettings `json:"settings"`
}
func (CatalogRequest) GoString ¶
func (r CatalogRequest) GoString() string
func (CatalogRequest) LogValue ¶
func (r CatalogRequest) LogValue() slog.Value
func (CatalogRequest) MarshalJSON ¶
func (r CatalogRequest) MarshalJSON() ([]byte, error)
func (CatalogRequest) String ¶
func (r CatalogRequest) String() string
type CatalogSettings ¶
type Connection ¶
type Connection struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
Kind string `json:"kind"`
Provider string `json:"provider"`
Name string `json:"name"`
Endpoint string `json:"endpoint"`
Settings Settings `json:"settings"`
State string `json:"state"`
Reason string `json:"reason"`
Capabilities map[string]domain.Capability `json:"capabilities"`
ServerVersion string `json:"server_version"`
VerifiedAt *time.Time `json:"verified_at"`
KeyConfirmedAt *time.Time `json:"key_confirmed_at,omitempty"`
CredentialVersion int64 `json:"credential_version"`
Version int64 `json:"version"`
Route *Route `json:"private_route,omitempty"`
SecretID *string `json:"-"`
}
func (Connection) NativeAgent ¶ added in v0.2.49
func (c Connection) NativeAgent() bool
type CreateRequest ¶
type CreateRequest struct {
Kind string `json:"kind"`
Provider string `json:"provider"`
Name string `json:"name"`
Endpoint string `json:"endpoint"`
Settings Settings `json:"settings"`
Secret string `json:"secret"`
PrivateRoute *Route `json:"private_route,omitempty"`
}
func (CreateRequest) GoString ¶
func (r CreateRequest) GoString() string
func (CreateRequest) LogValue ¶
func (r CreateRequest) LogValue() slog.Value
func (CreateRequest) MarshalJSON ¶
func (r CreateRequest) MarshalJSON() ([]byte, error)
func (CreateRequest) String ¶
func (r CreateRequest) String() string
type InUseError ¶
type InUseError struct {
Repositories, Runs, Calls int
}
func (*InUseError) Error ¶
func (e *InUseError) Error() string
func (*InUseError) Is ¶
func (e *InUseError) Is(target error) bool
type PlatformApp ¶
func (PlatformApp) GoString ¶
func (p PlatformApp) GoString() string
func (PlatformApp) LogValue ¶
func (p PlatformApp) LogValue() slog.Value
func (PlatformApp) String ¶
func (p PlatformApp) String() string
type PrivateProber ¶
type PrivateProber func(context.Context, Connection, ProbeAuthorization) error
type ProbeResult ¶
type Resolved ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, session auth.Session, orgID string, r CreateRequest, requestID string) (Connection, error)
func (*Service) CreateManagedTx ¶
func (*Service) MetadataTx ¶
func (*Service) ModelCatalog ¶
func (s *Service) ModelCatalog(ctx context.Context, session auth.Session, orgID string, r CatalogRequest) ([]CatalogItem, error)
func (*Service) RegisterCatalog ¶
func (*Service) RegisterPrivateProbe ¶
func (s *Service) RegisterPrivateProbe(probe PrivateProber)
func (*Service) RegisterRunnerCheck ¶
func (s *Service) RegisterRunnerCheck(check RunnerCheck)
func (*Service) SetPlatformApp ¶
func (s *Service) SetPlatformApp(app PlatformApp)
type Settings ¶
type Settings struct {
RuntimeUserID string `json:"runtime_user_id,omitempty"`
RuntimeRunnerID string `json:"runtime_runner_id,omitempty"`
RuntimeDisconnected bool `json:"runtime_disconnected,omitempty"`
Namespace string `json:"namespace,omitempty"`
Model string `json:"model,omitempty"`
Profile string `json:"profile,omitempty"`
AuthKind string `json:"auth_kind"`
BillingRoute string `json:"billing_route"`
AppID string `json:"app_id,omitempty"`
InstallationID string `json:"installation_id,omitempty"`
RuntimeVersion string `json:"runtime_version,omitempty"`
CAPEM string `json:"ca_pem,omitempty"`
AllowedModels []string `json:"allowed_models,omitempty"`
Managed string `json:"managed,omitempty"`
WebhookPending bool `json:"webhook_pending,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.