Documentation
¶
Overview ¶
Package cisipapiv1 : Operations and models for the CisIpApiV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalIpResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalIpResponseResult(m map[string]json.RawMessage, result interface{}) (err error)
- type CisIpApiV1
- func (cisIpApi *CisIpApiV1) Clone() *CisIpApiV1
- func (cisIpApi *CisIpApiV1) DisableRetries()
- func (cisIpApi *CisIpApiV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (cisIpApi *CisIpApiV1) GetEnableGzipCompression() bool
- func (cisIpApi *CisIpApiV1) GetServiceURL() string
- func (cisIpApi *CisIpApiV1) ListIps(listIpsOptions *ListIpsOptions) (result *IpResponse, response *core.DetailedResponse, err error)
- func (cisIpApi *CisIpApiV1) ListIpsWithContext(ctx context.Context, listIpsOptions *ListIpsOptions) (result *IpResponse, response *core.DetailedResponse, err error)
- func (*CisIpApiV1) NewListIpsOptions() *ListIpsOptions
- func (cisIpApi *CisIpApiV1) SetDefaultHeaders(headers http.Header)
- func (cisIpApi *CisIpApiV1) SetEnableGzipCompression(enableGzip bool)
- func (cisIpApi *CisIpApiV1) SetServiceURL(url string) error
- type CisIpApiV1Options
- type IpResponse
- type IpResponseResult
- type ListIpsOptions
Constants ¶
const DefaultServiceName = "cis_ip_api"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://api.cis.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
func GetServiceURLForRegion ¶ added in v0.12.1
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalIpResponse ¶
func UnmarshalIpResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalIpResponse unmarshals an instance of IpResponse from the specified map of raw messages.
func UnmarshalIpResponseResult ¶
func UnmarshalIpResponseResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalIpResponseResult unmarshals an instance of IpResponseResult from the specified map of raw messages.
Types ¶
type CisIpApiV1 ¶
type CisIpApiV1 struct {
Service *core.BaseService
}
CisIpApiV1 : This document describes CIS IP API.
Version: 1.0.0
func NewCisIpApiV1 ¶
func NewCisIpApiV1(options *CisIpApiV1Options) (service *CisIpApiV1, err error)
NewCisIpApiV1 : constructs an instance of CisIpApiV1 with passed in options.
func NewCisIpApiV1UsingExternalConfig ¶
func NewCisIpApiV1UsingExternalConfig(options *CisIpApiV1Options) (cisIpApi *CisIpApiV1, err error)
NewCisIpApiV1UsingExternalConfig : constructs an instance of CisIpApiV1 with passed in options and external configuration.
func (*CisIpApiV1) Clone ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) Clone() *CisIpApiV1
Clone makes a copy of "cisIpApi" suitable for processing requests.
func (*CisIpApiV1) DisableRetries ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*CisIpApiV1) EnableRetries ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.
func (*CisIpApiV1) GetEnableGzipCompression ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*CisIpApiV1) GetServiceURL ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*CisIpApiV1) ListIps ¶
func (cisIpApi *CisIpApiV1) ListIps(listIpsOptions *ListIpsOptions) (result *IpResponse, response *core.DetailedResponse, err error)
ListIps : List of all IP addresses used by the CIS proxy List of all IP addresses used by the CIS proxy.
func (*CisIpApiV1) ListIpsWithContext ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) ListIpsWithContext(ctx context.Context, listIpsOptions *ListIpsOptions) (result *IpResponse, response *core.DetailedResponse, err error)
ListIpsWithContext is an alternate form of the ListIps method which supports a Context parameter
func (*CisIpApiV1) NewListIpsOptions ¶
func (*CisIpApiV1) NewListIpsOptions() *ListIpsOptions
NewListIpsOptions : Instantiate ListIpsOptions
func (*CisIpApiV1) SetDefaultHeaders ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*CisIpApiV1) SetEnableGzipCompression ¶ added in v0.12.1
func (cisIpApi *CisIpApiV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*CisIpApiV1) SetServiceURL ¶
func (cisIpApi *CisIpApiV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
type CisIpApiV1Options ¶
type CisIpApiV1Options struct { ServiceName string URL string Authenticator core.Authenticator }
CisIpApiV1Options : Service options
type IpResponse ¶
type IpResponse struct { // Was operation successful. Success *bool `json:"success" validate:"required"` // errors. Errors [][]string `json:"errors" validate:"required"` // messages. Messages [][]string `json:"messages" validate:"required"` // Container for response information. Result *IpResponseResult `json:"result" validate:"required"` }
IpResponse : ip response.
type IpResponseResult ¶
type IpResponseResult struct { // List of IPv4 CIDR addresses. Ipv4Cidrs []string `json:"ipv4_cidrs,omitempty"` // List of IPv6 CIDR addresses. Ipv6Cidrs []string `json:"ipv6_cidrs,omitempty"` }
IpResponseResult : Container for response information.
type ListIpsOptions ¶
type ListIpsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListIpsOptions : The ListIps options.
func (*ListIpsOptions) SetHeaders ¶
func (options *ListIpsOptions) SetHeaders(param map[string]string) *ListIpsOptions
SetHeaders : Allow user to set Headers