config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWinRMCPConnection

func GetWinRMCPConnection(settings *Settings) (*winrmcp.Winrmcp, error)

GetWinRMCPConnection sets up a winrmcp client that can be used to upload files to the DC.

func GetWinRMConnection

func GetWinRMConnection(settings *Settings) (*winrm.Client, error)

GetWinRMConnection returns a WinRM connection

func NewKerberosTransporter

func NewKerberosTransporter(settings *Settings) func() winrm.Transporter

Types

type KerberosTransporter

type KerberosTransporter struct {
	Username  string
	Password  string
	Domain    string
	Hostname  string
	Port      int
	Proto     string
	SPN       string
	KrbConf   string
	KrbKeytab string
	// contains filtered or unexported fields
}

func (*KerberosTransporter) Post

func (c *KerberosTransporter) Post(_ *winrm.Client, request *soap.SoapMessage) (string, error)

func (*KerberosTransporter) Transport

func (c *KerberosTransporter) Transport(endpoint *winrm.Endpoint) error

type ProviderConf

type ProviderConf struct {
	Settings *Settings
	// contains filtered or unexported fields
}

ProviderConf holds structures that are useful to the provider at runtime.

func NewProviderConf

func NewProviderConf(settings *Settings) *ProviderConf

func (*ProviderConf) AcquireWinRMCPClient

func (pcfg *ProviderConf) AcquireWinRMCPClient() (winRMCPClient *winrmcp.Winrmcp, err error)

AcquireWinRMCPClient get a thread safe WinRM client from the pool. Create a new one if the pool is empty

func (*ProviderConf) AcquireWinRMClient

func (pcfg *ProviderConf) AcquireWinRMClient() (winRMClient *winrm.Client, err error)

AcquireWinRMClient get a thread safe WinRM client from the pool. Create a new one if the pool is empty

func (*ProviderConf) IdentifyDomainController added in v0.4.4

func (pcfg *ProviderConf) IdentifyDomainController() string

If a

func (*ProviderConf) IsConnectionTypeLocal

func (pcfg *ProviderConf) IsConnectionTypeLocal() bool

IsConnectionTypeLocal check if connection is local

func (*ProviderConf) IsPassCredentialsEnabled

func (pcfg *ProviderConf) IsPassCredentialsEnabled() bool

IsPassCredentialsEnabled check if credentials should be passed requires that https be enabled

func (*ProviderConf) ReleaseWinRMCPClient

func (pcfg *ProviderConf) ReleaseWinRMCPClient(winRMCPClient *winrmcp.Winrmcp)

ReleaseWinRMCPClient returns a thread safe WinRM client after usage to the pool.

func (*ProviderConf) ReleaseWinRMClient

func (pcfg *ProviderConf) ReleaseWinRMClient(winRMClient *winrm.Client)

ReleaseWinRMClient returns a thread safe WinRM client after usage to the pool.

type Settings

type Settings struct {
	WinRMUsername        string
	WinRMPassword        string
	WinRMHost            string
	WinRMPort            int
	WinRMProto           string
	WinRMInsecure        bool
	KrbRealm             string
	KrbConfig            string
	KrbKeytab            string
	KrbSpn               string
	WinRMUseNTLM         bool
	WinRMPassCredentials bool
	DomainName           string
	DomainController     string
}

Settings holds all the information necessary to configure the provider

func NewConfig

func NewConfig(d *schema.ResourceData) (*Settings, error)

NewConfig returns a new Config struct populated with Resource Data.

Jump to

Keyboard shortcuts

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