api

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 4 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
}

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

func (*Lookup) ParseDomain added in v1.62.0

func (l *Lookup) ParseDomain(r io.Reader)

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
}

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"`
	SHA256 string `json:"sha256,omitempty"`
	Count  int    `json:"file_count,omitempty"`
	Size   int    `json:"file_size,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