organization

package
v0.67.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const GiantSwarmDefaultTenant = "giantswarm"

Variables

View Source
var ErrOrganizationNotFound = errors.New("organization not found")
View Source
var SharedOrg = NewFromGrafana(1, "Shared Org")

Functions

This section is empty.

Types

type Organization

type Organization struct {
	// contains filtered or unexported fields
}

Organization represents a Grafana organization domain object

func New

func New(id int64, name string, tenants []TenantConfig, admins []string, editors []string, viewers []string) *Organization

New creates a new Organization domain object

func NewFromGrafana

func NewFromGrafana(id int64, name string) *Organization

NewFromGrafana creates a new Organization with only ID and name (for basic cases)

func (*Organization) Admins

func (o *Organization) Admins() []string

func (*Organization) Editors

func (o *Organization) Editors() []string

func (*Organization) GetAlertingTenants added in v0.54.0

func (o *Organization) GetAlertingTenants() []TenantConfig

GetAlertingTenants returns tenants that have alerting access The "giantswarm" tenant is only included if the organization name is "Giant Swarm"

func (*Organization) ID

func (o *Organization) ID() int64

Getters (pure accessors)

func (*Organization) Name

func (o *Organization) Name() string

func (*Organization) SetID

func (o *Organization) SetID(id int64)

SetID updates the organization ID (used when the organization is created in Grafana)

func (*Organization) String

func (o *Organization) String() string

String provides a string representation for debugging

func (*Organization) TenantIDs

func (o *Organization) TenantIDs() []string

TenantIDs returns a slice of all tenant IDs

func (*Organization) Tenants added in v0.54.0

func (o *Organization) Tenants() []TenantConfig

func (*Organization) Viewers

func (o *Organization) Viewers() []string

type TenantConfig added in v0.54.0

type TenantConfig struct {
	Name  string
	Types []string // "data" and/or "alerting"
}

TenantConfig represents a tenant with its access types

Jump to

Keyboard shortcuts

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