resolver

package
v0.12.6 Latest Latest
Warning

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

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

Documentation

Overview

Package resolver contains functions that resolve names and ID strings of autokitteh entities to their concrete SDK types.

Index

Constants

This section is empty.

Variables

View Source
var NotFoundErrorType = new(NotFoundError)

Functions

This section is empty.

Types

type NotFoundError

type NotFoundError struct {
	Type, Name string
}

FIXME: move to sdkerrors

func (NotFoundError) Error

func (e NotFoundError) Error() string

type Resolver

type Resolver struct {
	Client sdkservices.DBServices
}

func (Resolver) BuildID

func (r Resolver) BuildID(ctx context.Context, id string) (b sdktypes.Build, bid sdktypes.BuildID, err error)

BuildID returns a build, based on the given ID. It does NOT accept empty input.

func (Resolver) ConnectionNameOrID

func (r Resolver) ConnectionNameOrID(ctx context.Context, nameOrID, project string) (c sdktypes.Connection, cid sdktypes.ConnectionID, err error)

ConnectionNameOrID returns a connection, based on the given name or ID. If the input is empty, we return nil but not an error.

func (Resolver) DeploymentID

func (r Resolver) DeploymentID(ctx context.Context, id string) (d sdktypes.Deployment, did sdktypes.DeploymentID, err error)

DeploymentID returns a deployment, based on the given ID. It does NOT accept empty input.

func (Resolver) EventID

func (r Resolver) EventID(ctx context.Context, id string) (e sdktypes.Event, eid sdktypes.EventID, err error)

EventID returns an event, based on the given ID. It does NOT accept empty input.

func (Resolver) IntegrationNameOrID

func (r Resolver) IntegrationNameOrID(ctx context.Context, nameOrID string) (sdktypes.Integration, sdktypes.IntegrationID, error)

IntegrationNameOrID returns an integration, based on the given name or ID. If the input is empty, we return nil but not an error.

func (Resolver) Org added in v0.12.1

func (r Resolver) Org(ctx context.Context, org string) (oid sdktypes.OrgID, err error)

Org returns an org, based on the or ID supplied by org.

func (Resolver) ProjectNameOrID

func (r Resolver) ProjectNameOrID(ctx context.Context, nameOrID string) (sdktypes.ProjectID, error)

ProjectNameOrID returns a project, based on the given name or ID. If the input is empty, we return nil but not an error.

func (Resolver) SessionID

func (r Resolver) SessionID(ctx context.Context, id string) (s sdktypes.Session, sid sdktypes.SessionID, err error)

SessionID returns a session, based on the given ID. If the input is empty, we return nil but not an error.

func (Resolver) TriggerID added in v0.2.0

func (r Resolver) TriggerID(ctx context.Context, id string) (t sdktypes.Trigger, tid sdktypes.TriggerID, err error)

TriggerID returns a trigger, based on the given ID. If the input is empty, we return nil but not an error.

func (Resolver) TriggerNameOrID added in v0.9.0

func (r Resolver) TriggerNameOrID(ctx context.Context, nameOrID, project string) (c sdktypes.Trigger, cid sdktypes.TriggerID, err error)

TriggerNameOrID returns a trigger, based on the given name or ID. If the input is empty, we return nil but not an error.

func (Resolver) User added in v0.12.1

func (r Resolver) User(ctx context.Context, nameEmailOrID string) (u sdktypes.User, uid sdktypes.UserID, err error)

User returns a user, based on the given name, email or ID supplied by nameEmailOrID.

Jump to

Keyboard shortcuts

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