Documentation ¶
Index ¶
- func Verify(configPath string) error
- type PNAPClient
- func (pnapClient PNAPClient) Delete(resource string) (*http.Response, error)
- func (pnapClient PNAPClient) Get(resource string) (*http.Response, error)
- func (pnapClient PNAPClient) Post(resource string, body io.Reader) (*http.Response, error)
- func (pnapClient PNAPClient) Put(resource string, body io.Reader) (*http.Response, error)
- func (pnapClient PNAPClient) SetAuthentication(auth dto.Authentication)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PNAPClient ¶
type PNAPClient struct {
// contains filtered or unexported fields
}
PNAPClient is a Client that performs HTTP requests.
func NewPNAPClient ¶
func NewPNAPClient(auth dto.Authentication) PNAPClient
NewPNAPClient creates a new PNAPClient with forwarded credentials
func NewPNAPClientWithCustomConfig ¶
func NewPNAPClientWithCustomConfig(path string) (PNAPClient, error)
NewPNAPClientWithCustomConfig creates a new PNAPClient. Verification of configuration will be done prior to creation and error will be returned in case credentials or whole configuration file is missing
func NewPNAPClientWithDefaultConfig ¶
func NewPNAPClientWithDefaultConfig() (PNAPClient, error)
NewPNAPClientWithDefaultConfig creates a new PNAPClient. Verification of configuration will be done prior to creation and error will be returned in case credentials or whole configuration file is missing
func (PNAPClient) Delete ¶
func (pnapClient PNAPClient) Delete(resource string) (*http.Response, error)
Delete performs a Delete request and check for auth errors
func (PNAPClient) Get ¶
func (pnapClient PNAPClient) Get(resource string) (*http.Response, error)
Get performs a Get request and check for auth errors
func (PNAPClient) SetAuthentication ¶
func (pnapClient PNAPClient) SetAuthentication(auth dto.Authentication)
SetAuthentication offers option to override initially set authentication object with new values