Documentation ¶
Index ¶
Constants ¶
View Source
const ConnectionErrorMsg = "failed to connect to internal Pages API"
ConnectionErrorMsg to be returned with `gc.Status` if Pages fails to connect to the internal GitLab API, times out or a 401 given that the credentials used are wrong
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a HTTP client to access Pages internal API
func NewClient ¶
func NewClient(baseURL string, secretKey []byte, connectionTimeout, jwtTokenExpiry time.Duration) (*Client, error)
NewClient initializes and returns new Client baseUrl is appConfig.InternalGitLabServer secretKey is appConfig.GitLabAPISecretKey
func NewFromConfig ¶
NewFromConfig creates a new client from Config struct
func (*Client) GetLookup ¶
GetLookup returns a VirtualDomain configuration wrapped into a Lookup for a given host
type Config ¶
type Config interface { InternalGitLabServerURL() string GitlabAPISecret() []byte GitlabClientConnectionTimeout() time.Duration GitlabJWTTokenExpiry() time.Duration DomainConfigSource() string }
Config represents an interface that is configuration provider for client capable of comunicating with GitLab
type StubClient ¶
StubClient is a stubbed client used for testing
func (StubClient) Status ¶ added in v1.22.0
func (c StubClient) Status() error
Click to show internal directories.
Click to hide internal directories.