Documentation ¶
Index ¶
- func Verify(configPath string) error
- func VerifyFromPnapClient(configPath string) error
- type BMCSDK
- 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.Configuration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyFromPnapClient ¶ added in v0.1.2
Verify verifies existence of configuration file and credentials
Types ¶
type BMCSDK ¶
type BMCSDK struct { APIClient bmcapiclient.APIClient RancherAPIClient rancherapiclient.APIClient NetworkAPIClient networkapiclient.APIClient TagAPIClient tagapiclient.APIClient AuditAPIClient auditapiclient.APIClient IpBlockAPIClient ipapiclient.APIClient NetworkStorageAPIClient networkstorageapiclient.APIClient BillingAPIClient billingapiclient.APIClient LocationAPIClient locationapiclient.APIClient InvoicingAPIClient invoicingapiclient.APIClient PaymentsAPIClient paymentsapiclient.APIClient PNAPClient PNAPClient }
BMCSDK is a Client that performs HTTP requests.
func NewBMCSDK ¶
func NewBMCSDK(auth dto.Configuration) BMCSDK
NewBMCSDK creates a new BMCSDK receiver with credentials from auth object
func NewBMCSDKWithCustomConfig ¶
func NewBMCSDKWithCustomConfig(path string, auth dto.Configuration) (BMCSDK, error)
NewBMCSDKWithCustomConfig creates a new BMCSDK receiver with credentials from configuration file on custom path. Verification of configuration file will be done prior to creation and error will be returned in case credentials or whole configuration file is missing
func NewBMCSDKWithDefaultConfig ¶
func NewBMCSDKWithDefaultConfig(auth dto.Configuration) (BMCSDK, error)
NewBMCSDKWithDefaultConfig creates a new BMCSDK receiver with credentials from config file on default path. Verification of configuration file will be done prior to creation and error will be returned in case credentials or whole configuration file is missing
func NewBMCSDKWithTokenAuthentication ¶ added in v0.2.0
func NewBMCSDKWithTokenAuthentication(auth dto.Configuration) BMCSDK
NewBMCSDKWithTokenAuthentication creates a new BMCSDK receiver with Bearer token directly set to the header
type PNAPClient ¶ added in v0.1.2
type PNAPClient struct {
// contains filtered or unexported fields
}
PNAPClient is a Client that performs HTTP requests.
func NewPNAPClient ¶ added in v0.1.2
func NewPNAPClient(auth dto.Configuration) PNAPClient
NewPNAPClient creates a new PNAPClient with forwarded credentials
func NewPNAPClientWithCustomConfig ¶ added in v0.1.2
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 ¶ added in v0.1.2
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 NewPNAPClientWithTokenAuthentication ¶ added in v0.2.0
func NewPNAPClientWithTokenAuthentication(auth dto.Configuration) PNAPClient
NewPNAPClientWithTokenAuthentication creates a new PNAPClient that will be authenticated by directly adding Bearer token to the Authorizaton header.
func (PNAPClient) Delete ¶ added in v0.1.2
func (pnapClient PNAPClient) Delete(resource string) (*http.Response, error)
Delete performs a Delete request and check for auth errors
func (PNAPClient) Get ¶ added in v0.1.2
func (pnapClient PNAPClient) Get(resource string) (*http.Response, error)
Get performs a Get request and check for auth errors
func (*PNAPClient) SetAuthentication ¶ added in v0.1.2
func (pnapClient *PNAPClient) SetAuthentication(auth dto.Configuration)
SetAuthentication offers option to override initially set authentication object with new values