Documentation ¶
Overview ¶
Package arkiface provides an interface to enable mocking the ARK service client for testing your code.
It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.
Index ¶
- Constants
- type ARK
- func (c *ARK) GetApiKey(input *GetApiKeyInput) (*GetApiKeyOutput, error)
- func (c *ARK) GetApiKeyCommon(input *map[string]interface{}) (*map[string]interface{}, error)
- func (c *ARK) GetApiKeyCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
- func (c *ARK) GetApiKeyCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
- func (c *ARK) GetApiKeyRequest(input *GetApiKeyInput) (req *request.Request, output *GetApiKeyOutput)
- func (c *ARK) GetApiKeyWithContext(ctx volcengine.Context, input *GetApiKeyInput, opts ...request.Option) (*GetApiKeyOutput, error)
- type ARKAPI
- type GetApiKeyInput
- func (s GetApiKeyInput) GoString() string
- func (s *GetApiKeyInput) SetDurationSeconds(v int32) *GetApiKeyInput
- func (s *GetApiKeyInput) SetResourceIds(v []*string) *GetApiKeyInput
- func (s *GetApiKeyInput) SetResourceType(v string) *GetApiKeyInput
- func (s GetApiKeyInput) String() string
- func (s *GetApiKeyInput) Validate() error
- type GetApiKeyOutput
Constants ¶
const ( ServiceName = "ark" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "ark" // ServiceID is a unique identifer of a specific service. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ARK ¶
ARK provides the API operation methods for making requests to ARK. See this package's package overview docs for details on the service.
ARK methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*volcengine.Config) *ARK
New create int can support ssl or region locate set
func (*ARK) GetApiKey ¶
func (c *ARK) GetApiKey(input *GetApiKeyInput) (*GetApiKeyOutput, error)
GetApiKey API operation for ARK.
Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.
See the VOLCENGINE API reference guide for ARK's API operation GetApiKey for usage and error information.
func (*ARK) GetApiKeyCommon ¶
GetApiKeyCommon API operation for ARK.
Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.
See the VOLCENGINE API reference guide for ARK's API operation GetApiKeyCommon for usage and error information.
func (*ARK) GetApiKeyCommonRequest ¶
func (c *ARK) GetApiKeyCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
GetApiKeyCommonRequest generates a "volcengine/request.Request" representing the client's request for the GetApiKeyCommon operation. The "output" return value will be populated with the GetApiKeyCommon request's response once the request completes successfully.
Use "Send" method on the returned GetApiKeyCommon Request to send the API call to the service. the "output" return value is not valid until after GetApiKeyCommon Send returns without error.
See GetApiKeyCommon for more information on using the GetApiKeyCommon API call, and error handling.
// Example sending a request using the GetApiKeyCommonRequest method. req, resp := client.GetApiKeyCommonRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
func (*ARK) GetApiKeyCommonWithContext ¶
func (c *ARK) GetApiKeyCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
GetApiKeyCommonWithContext is the same as GetApiKeyCommon with the addition of the ability to pass a context and additional request options.
See GetApiKeyCommon for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*ARK) GetApiKeyRequest ¶
func (c *ARK) GetApiKeyRequest(input *GetApiKeyInput) (req *request.Request, output *GetApiKeyOutput)
GetApiKeyRequest generates a "volcengine/request.Request" representing the client's request for the GetApiKey operation. The "output" return value will be populated with the GetApiKeyCommon request's response once the request completes successfully.
Use "Send" method on the returned GetApiKeyCommon Request to send the API call to the service. the "output" return value is not valid until after GetApiKeyCommon Send returns without error.
See GetApiKey for more information on using the GetApiKey API call, and error handling.
// Example sending a request using the GetApiKeyRequest method. req, resp := client.GetApiKeyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
func (*ARK) GetApiKeyWithContext ¶
func (c *ARK) GetApiKeyWithContext(ctx volcengine.Context, input *GetApiKeyInput, opts ...request.Option) (*GetApiKeyOutput, error)
GetApiKeyWithContext is the same as GetApiKey with the addition of the ability to pass a context and additional request options.
See GetApiKey for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type ARKAPI ¶
type ARKAPI interface { GetApiKeyCommon(*map[string]interface{}) (*map[string]interface{}, error) GetApiKeyCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) GetApiKeyCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) GetApiKey(*GetApiKeyInput) (*GetApiKeyOutput, error) GetApiKeyWithContext(volcengine.Context, *GetApiKeyInput, ...request.Option) (*GetApiKeyOutput, error) GetApiKeyRequest(*GetApiKeyInput) (*request.Request, *GetApiKeyOutput) }
ARKAPI provides an interface to enable mocking the ark.ARK service client's API operation,
// volcengine sdk func uses an SDK service client to make a request to // ARK. func myFunc(svc ARKAPI) bool { // Make svc.GetApiKey request } func main() { sess := session.New() svc := ark.New(sess) myFunc(svc) }
type GetApiKeyInput ¶
type GetApiKeyInput struct { // DurationSeconds is a required field DurationSeconds *int32 `type:"int32" required:"true"` ResourceIds []*string `type:"list"` // ResourceType is a required field ResourceType *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (GetApiKeyInput) GoString ¶
func (s GetApiKeyInput) GoString() string
GoString returns the string representation
func (*GetApiKeyInput) SetDurationSeconds ¶
func (s *GetApiKeyInput) SetDurationSeconds(v int32) *GetApiKeyInput
SetDurationSeconds sets the DurationSeconds field's value.
func (*GetApiKeyInput) SetResourceIds ¶
func (s *GetApiKeyInput) SetResourceIds(v []*string) *GetApiKeyInput
SetResourceIds sets the ResourceIds field's value.
func (*GetApiKeyInput) SetResourceType ¶
func (s *GetApiKeyInput) SetResourceType(v string) *GetApiKeyInput
SetResourceType sets the ResourceType field's value.
func (GetApiKeyInput) String ¶
func (s GetApiKeyInput) String() string
String returns the string representation
func (*GetApiKeyInput) Validate ¶
func (s *GetApiKeyInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GetApiKeyOutput ¶
type GetApiKeyOutput struct { Metadata *response.ResponseMetadata ApiKey *string `type:"string"` ExpiredTime *int32 `type:"int32"` // contains filtered or unexported fields }
func (GetApiKeyOutput) GoString ¶
func (s GetApiKeyOutput) GoString() string
GoString returns the string representation
func (*GetApiKeyOutput) SetApiKey ¶
func (s *GetApiKeyOutput) SetApiKey(v string) *GetApiKeyOutput
SetApiKey sets the ApiKey field's value.
func (*GetApiKeyOutput) SetExpiredTime ¶
func (s *GetApiKeyOutput) SetExpiredTime(v int32) *GetApiKeyOutput
SetExpiredTime sets the ExpiredTime field's value.
func (GetApiKeyOutput) String ¶
func (s GetApiKeyOutput) String() string
String returns the string representation