connect

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Endpoint    string
	Token       string
	PassHeaders []string
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend(endpoint string, token string) Backend

func (*Backend) FetchCredential

func (be *Backend) FetchCredential(ctx context.Context, resource string, headers http.Header) (*Credential, error)

func (*Backend) SetLogger

func (be *Backend) SetLogger(logger *logrus.Logger)

func (*Backend) SetPassHeaders

func (be *Backend) SetPassHeaders(headers []string)

type Credential

type Credential struct {
	DatabaseURL string `json:"database_url"`
}

Credential holds the database connection string

type Request

type Request struct {
	Resource string            `json:"resource"`
	Token    string            `json:"token"`
	Headers  map[string]string `json:"headers,omitempty"`
}

Request holds the resource request details

Jump to

Keyboard shortcuts

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