connector

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package connector manages the creating and deletion of service bindings to MS SQL Server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

func New

func New(server string, port int, username, password, database, encrypt string) *Connector

func (*Connector) CheckDatabaseExists

func (c *Connector) CheckDatabaseExists(ctx context.Context, dbName string) (result bool, err error)

func (*Connector) CreateBinding

func (c *Connector) CreateBinding(ctx context.Context, username, password string, roles []string) error

CreateBinding creates the binding user, adds roles and grants permission to execute store procedures It is idempotent.

func (*Connector) DeleteBinding

func (c *Connector) DeleteBinding(ctx context.Context, username string) error

DeleteBinding drops the binding user. It is idempotent.

func (*Connector) ManageObjectReassignment

func (c *Connector) ManageObjectReassignment(ctx context.Context, username string) error

func (*Connector) ReadBinding

func (c *Connector) ReadBinding(ctx context.Context, username string) (result bool, err error)

ReadBinding checks whether the binding exists

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(
	server,
	username,
	password,
	database,
	encrypt string,
	port int,
) *Encoder

func (*Encoder) Encode

func (b *Encoder) Encode() string

func (*Encoder) EncodeWithoutDB

func (b *Encoder) EncodeWithoutDB() string

Jump to

Keyboard shortcuts

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