api

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Resolve retrieves an VirtualDomain from the GitLab API and wraps it into a Lookup
	GetLookup(ctx context.Context, domain string) Lookup

	// Status checks the connectivity with the GitLab API
	Status() error
}

Client represents an interface we use to retrieve information from GitLab

type Lookup

type Lookup struct {
	Name   string
	Error  error
	Domain *VirtualDomain
}

Lookup defines an API lookup action with a response that GitLab sends

type LookupPath

type LookupPath struct {
	ProjectID     int    `json:"project_id,omitempty"`
	AccessControl bool   `json:"access_control,omitempty"`
	HTTPSOnly     bool   `json:"https_only,omitempty"`
	Prefix        string `json:"prefix,omitempty"`
	Source        Source `json:"source,omitempty"`
}

LookupPath represents a lookup path for a virtual domain

type Resolver

type Resolver interface {
	// Resolve retrieves an VirtualDomain from the GitLab API and wraps it into a Lookup
	Resolve(ctx context.Context, domain string) *Lookup

	// Status checks the connectivity with the GitLab API
	Status() error
}

Resolver represents an interface we use to retrieve information from GitLab in a more generic way. It can be a concrete API client or cached client.

type Source added in v1.17.0

type Source struct {
	Type string `json:"type,omitempty"`
	Path string `json:"path,omitempty"`
}

Source describes GitLab Page serving variant

type VirtualDomain

type VirtualDomain struct {
	Certificate string `json:"certificate,omitempty"`
	Key         string `json:"key,omitempty"`

	LookupPaths []LookupPath `json:"lookup_paths"`
}

VirtualDomain represents a GitLab Pages virtual domain that is being sent from GitLab API

Jump to

Keyboard shortcuts

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