resource

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package resource implements API functions residing under /core/resource. This path contains methods for querying resources and attaching tags to them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	List(ctx context.Context, page, limit int) ([]Summary, error)
	Get(ctx context.Context, id string) (Info, error)
	AttachTag(ctx context.Context, resourceID, tagName string) ([]Summary, error)
	DetachTag(ctx context.Context, resourceID, tagName string) error
}

API contains methods for tag control.

func NewAPI

func NewAPI(c client.Client) API

NewAPI creates a new tags API instance with the given client.

type Info

type Info = v1.Resource

type Summary

type Summary struct {
	Identifier string `json:"identifier"`
	Name       string `json:"name"`
}

Summary describes a resource in short.

type Type

type Type = v1.Type

Jump to

Keyboard shortcuts

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