models

package
v0.0.0-...-8b3eb0f Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QueryTypeCommits is sent by the frontend when querying commits in a GitLab repository
	QueryTypeCommits = "Commits"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitsQuery

type CommitsQuery struct {
	Query
	Options ListCommitsOptions `json:"options"`
}

CommitsQuery is used when querying for GitLab commits

type ListCommitsOptions

type ListCommitsOptions struct {
	ProjectID string `json:"projectId"`
	Ref       string `json:"gitRef"`
}

ListCommitsOptions provides options when retrieving commits

func CommitsOptionsWithRepo

func CommitsOptionsWithRepo(opt ListCommitsOptions, projectID string) ListCommitsOptions

CommitsOptionsWithRepo adds Owner and Repo to a ListCommitsOptions. This is just for convenience

type Query

type Query struct {
	ProjectID string `json:"projectId"`
}

Query refers to the structure of a query built using the QueryEditor. Every query uses this query type and has to include options for each type of query. For example, listing commits can be filtered by author, but filtering contributors by author doesn't provide much value, but is included in the query schema anyways.

type Settings

type Settings struct {
	URL         string `json:"url"`
	AccessToken string `json:"accessToken"`
}

Settings represents the datasource settings in Grafana.

func LoadSettings

func LoadSettings(settings backend.DataSourceInstanceSettings) (Settings, error)

LoadSettings converts the DataSourceInLoadSettings to usable GitLab settings.

Jump to

Keyboard shortcuts

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