client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Client

type Client struct {
	Logger zerolog.Logger
	Specs  *Spec
	Client *ldap.Conn
}

func (*Client) ID

func (c *Client) ID() string

type Column

type Column struct {
	Name        string  `json:"name,omitempty" yaml:"name,omitempty"`
	Description *string `json:"description,omitempty" yaml:"description,omitempty"`
	Type        *string `json:"type,omitempty" yaml:"type,omitempty"`
	Key         bool    `json:"key,omitempty" yaml:"pk,omitempty"`
	Unique      bool    `json:"unique,omitempty" yaml:"unique,omitempty"`
	NotNull     bool    `json:"notnull,omitempty" yaml:"notnull,omitempty"`
	Mapping     string  `json:"mapping,omitempty" yaml:"mapping,omitempty"`
}

type Query

type Query struct {
	BaseDN     string   `json:"basedn,omitempty" yaml:"basedn,omitempty"`
	Query      string   `json:"query,omitempty" yaml:"query,omitempty"`
	Scope      *string  `json:"scope,omitempty" yaml:"scope,omitempty"`
	Attributes []string `json:"attributes,omitempty" yaml:"attributes,omitempty"`
	Filter     *string  `json:"filter,omitempty" yaml:"filter,omitempty"`
}

type Spec

type Spec struct {
	Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
	Password string `json:"password,omitempty" yaml:"password,omitempty"`
	SkipTLS  bool   `json:"skiptls,omitempty" yaml:"skiptls,omitempty"`
	Query    Query  `json:"query,omitempty" yaml:"query,omitempty"`
	Table    Table  `json:"table,omitempty" yaml:"table,omitempty"`
}

type Table

type Table struct {
	Name        string    `json:"name,omitempty" yaml:"name,omitempty"`
	Description *string   `json:"description,omitempty" yaml:"description,omitempty"`
	Columns     []*Column `json:"columns,omitempty" yaml:"columns,omitempty"`
}

Jump to

Keyboard shortcuts

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