resource

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package resource defines an interface for recording changes to InfluxDB resources.

A resource is an entity in our system, e.g. an organization, task or bucket. A change includes the creation, update or deletion of a resource.

Index

Constants

View Source
const (
	// Create a resource.
	Create ChangeType = "create"
	// Put a resource.
	Put = "put"
	// Update a resource.
	Update = "update"
	// Delete a resource
	Delete = "delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	// Type of change.
	Type ChangeType
	// ResourceID of the changed resource.
	ResourceID influxdb.ID
	// ResourceType that was changed.
	ResourceType influxdb.ResourceType
	// OrganizationID of the organization owning the changed resource.
	OrganizationID influxdb.ID
	// UserID of the user changing the resource.
	UserID influxdb.ID
	// ResourceBody after the change.
	ResourceBody []byte
	// Time when the resource was changed.
	Time time.Time
}

Change to a resource.

type ChangeType

type ChangeType string

Type of change.

type Logger

type Logger interface {
	// Log a change to a resource.
	Log(Change) error
}

Logger records changes to resources.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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