resource

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	AuthorizationFinder interface {
		FindAuthorizationByID(context.Context, influxdb.ID) (*influxdb.Authorization, error)
	}
	BucketFinder interface {
		FindBucketByID(context.Context, influxdb.ID) (*influxdb.Bucket, error)
	}
	OrganizationFinder interface {
		FindOrganizationByID(context.Context, influxdb.ID) (*influxdb.Organization, error)
	}
	DashboardFinder interface {
		FindDashboardByID(context.Context, influxdb.ID) (*influxdb.Dashboard, error)
	}
	SourceFinder interface {
		FindSourceByID(context.Context, influxdb.ID) (*influxdb.Source, error)
	}
	TaskFinder interface {
		FindTaskByID(context.Context, influxdb.ID) (*influxdb.Task, error)
	}
	TelegrafConfigFinder interface {
		FindTelegrafConfigByID(context.Context, influxdb.ID) (*influxdb.TelegrafConfig, error)
	}
	VariableFinder interface {
		FindVariableByID(context.Context, influxdb.ID) (*influxdb.Variable, error)
	}
	TargetFinder interface {
		GetTargetByID(context.Context, influxdb.ID) (*influxdb.ScraperTarget, error)
	}
	CheckFinder interface {
		FindCheckByID(context.Context, influxdb.ID) (influxdb.Check, error)
	}
	NotificationEndpointFinder interface {
		FindNotificationEndpointByID(context.Context, influxdb.ID) (influxdb.NotificationEndpoint, error)
	}
	NotificationRuleFinder interface {
		FindNotificationRuleByID(context.Context, influxdb.ID) (influxdb.NotificationRule, error)
	}
}

Resolver is a type which combines multiple resource services in order to resolve the resources associated org ID. Ideally you do not need to use this type, it is mostly a stop-gap while we migrate responsibilities off of *kv.Service. Consider it deprecated.

func (*Resolver) FindResourceName

func (o *Resolver) FindResourceName(ctx context.Context, rt influxdb.ResourceType, id influxdb.ID) (string, error)

FindResourceName is used to find the name of the resource associated with the provided type and id.

func (*Resolver) FindResourceOrganizationID

func (o *Resolver) FindResourceOrganizationID(ctx context.Context, rt influxdb.ResourceType, id influxdb.ID) (influxdb.ID, error)

FindResourceOrganizationID is used to find the organization that a resource belongs to five the id of a resource and a resource type.

Jump to

Keyboard shortcuts

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