client

package
v0.0.0-...-d4d7cce Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 45 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultHost is the default Host
	// found in Meta (info) section of spec file
	DefaultHost string = "localhost"
	// DefaultBasePath is the default BasePath
	// found in Meta (info) section of spec file
	DefaultBasePath string = "/api"
)

Variables

View Source
var Default = NewHTTPClient(nil)

Default grafana HTTP API HTTP client.

View Source
var DefaultSchemes = []string{"http", "https"}

DefaultSchemes are the default schemes found in Meta (info) section of spec file

Functions

This section is empty.

Types

type GrafanaHTTPAPI

type GrafanaHTTPAPI struct {
	AccessControl access_control.ClientService

	AccessControlProvisioning access_control_provisioning.ClientService

	Admin admin.ClientService

	AdminLdap admin_ldap.ClientService

	AdminProvisioning admin_provisioning.ClientService

	AdminUsers admin_users.ClientService

	Annotations annotations.ClientService

	APIKeys api_keys.ClientService

	Correlations correlations.ClientService

	DashboardPermissions dashboard_permissions.ClientService

	DashboardVersions dashboard_versions.ClientService

	Dashboards dashboards.ClientService

	DatasourcePermissions datasource_permissions.ClientService

	Datasources datasources.ClientService

	Ds ds.ClientService

	Enterprise enterprise.ClientService

	FolderPermissions folder_permissions.ClientService

	Folders folders.ClientService

	GetCurrentOrg get_current_org.ClientService

	LdapDebug ldap_debug.ClientService

	LegacyAlerts legacy_alerts.ClientService

	LegacyAlertsNotificationChannels legacy_alerts_notification_channels.ClientService

	LibraryElements library_elements.ClientService

	Licensing licensing.ClientService

	Org org.ClientService

	OrgInvites org_invites.ClientService

	OrgPreferences org_preferences.ClientService

	Orgs orgs.ClientService

	Playlists playlists.ClientService

	Provisioning provisioning.ClientService

	QueryHistory query_history.ClientService

	RecordingRules recording_rules.ClientService

	Reports reports.ClientService

	Saml saml.ClientService

	Search search.ClientService

	ServiceAccounts service_accounts.ClientService

	SignedInUser signed_in_user.ClientService

	Snapshots snapshots.ClientService

	SyncTeamGroups sync_team_groups.ClientService

	Teams teams.ClientService

	UserPreferences user_preferences.ClientService

	Users users.ClientService

	Transport runtime.ClientTransport
}

GrafanaHTTPAPI is a client for grafana HTTP API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *GrafanaHTTPAPI

New creates a new grafana HTTP API client

func NewHTTPClient

func NewHTTPClient(formats strfmt.Registry) *GrafanaHTTPAPI

NewHTTPClient creates a new grafana HTTP API HTTP client.

func NewHTTPClientWithConfig

func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *GrafanaHTTPAPI

NewHTTPClientWithConfig creates a new grafana HTTP API HTTP client, using a customizable transport config.

func (*GrafanaHTTPAPI) SetTransport

func (c *GrafanaHTTPAPI) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client and all its subresources

type TransportConfig

type TransportConfig struct {
	Host     string
	BasePath string
	Schemes  []string
}

TransportConfig contains the transport related info, found in the meta section of the spec file.

func DefaultTransportConfig

func DefaultTransportConfig() *TransportConfig

DefaultTransportConfig creates a TransportConfig with the default settings taken from the meta section of the spec file.

func (*TransportConfig) WithBasePath

func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig

WithBasePath overrides the default basePath, provided by the meta section of the spec file.

func (*TransportConfig) WithHost

func (cfg *TransportConfig) WithHost(host string) *TransportConfig

WithHost overrides the default host, provided by the meta section of the spec file.

func (*TransportConfig) WithSchemes

func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig

WithSchemes overrides the default schemes, provided by the meta section of the spec file.

Jump to

Keyboard shortcuts

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