client

package
v0.0.0-...-5add76e Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseURLColumn = schema.Column{
	Name:        "base_url",
	Type:        arrow.BinaryTypes.String,
	Description: "GitLab instance base URL",
	NotNull:     true,
	PrimaryKey:  true,
	Resolver:    ResolveURL,
}
View Source
var JSONSchema string

Functions

func Configure

func Configure(ctx context.Context, logger zerolog.Logger, s Spec) (schema.ClientMeta, error)

func GitlabMockTestHelper

func GitlabMockTestHelper(t *testing.T, table *schema.Table, createService func(*httprouter.Router) error, options TestOptions)

func ResolveURL

func ResolveURL(_ context.Context, meta schema.ClientMeta, r *schema.Resource, col schema.Column) error

func TransformWithStruct

func TransformWithStruct(t any, opts ...transformers.StructTransformerOption) schema.Transform

Types

type Client

type Client struct {
	Gitlab *gitlab.Client

	BaseURL        string
	MinAccessLevel *gitlab.AccessLevelValue
	// contains filtered or unexported fields
}

func (*Client) ID

func (*Client) ID() string

func (*Client) Logger

func (c *Client) Logger() *zerolog.Logger

type Spec

type Spec struct {
	// An access token for your GitLab server. For instructions on how to generate an access token [visit the GitLab docs](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token).
	Token string `json:"access_token,omitempty" jsonschema:"required,minLength=1"`
	//	URL for your self hosted GitLab server. Leave empty for GitLab SaaS. Not all tables are supported for GitLab SaaS.
	BaseURL string `json:"base_url,omitempty"`
	// A best effort maximum number of Go routines to use. Lower this number to reduce memory usage.
	Concurrency int `json:"concurrency,omitempty" jsonschema:"minimum=1,default=10000"`
}

Spec is the (nested) spec used by the GitLab source plugin:

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

func (*Spec) Validate

func (s *Spec) Validate() error

type TestOptions

type TestOptions struct{}

Directories

Path Synopsis
spec
gen

Jump to

Keyboard shortcuts

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