AccessToken Access token response for OCI Container Registry extension authentication.
type AccessToken struct {
// Access token string.
Token *string `mandatory:"true" json:"token"`
// Access token string (alias for token).
AccessToken *string `mandatory:"true" json:"access_token"`
// Scope that restricts access to resources.
Scope *string `mandatory:"true" json:"scope"`
// Seconds until the token expires.
ExpiresIn *int `mandatory:"true" json:"expires_in"`
}
func (m AccessToken) String() string
func (m AccessToken) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
ContainerRegistryClient a client for ContainerRegistry
type ContainerRegistryClient struct {
common.BaseClient
// contains filtered or unexported fields
}
func NewContainerRegistryClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ContainerRegistryClient, err error)
NewContainerRegistryClientWithConfigurationProvider Creates a new default ContainerRegistry client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region
func NewContainerRegistryClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ContainerRegistryClient, err error)
NewContainerRegistryClientWithOboToken Creates a new default ContainerRegistry client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer
as well as reading the region
func (client *ContainerRegistryClient) ConfigurationProvider() *common.ConfigurationProvider
ConfigurationProvider the ConfigurationProvider used in this client, or null if none set
func (client ContainerRegistryClient) GetAccessToken(ctx context.Context, request GetAccessTokenRequest) (response GetAccessTokenResponse, err error)
GetAccessToken Get a token using basic auth credentials or signature headers
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerregistry/GetAccessToken.go.html to see an example of how to use GetAccessToken API. A default retry strategy applies to this operation GetAccessToken()
func (client *ContainerRegistryClient) SetRegion(region string)
SetRegion overrides the region of this client.
GetAccessTokenRequest wrapper for the GetAccessToken operation
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerregistry/GetAccessToken.go.html to see an example of how to use GetAccessTokenRequest.
type GetAccessTokenRequest struct {
// Domain name of the target service server.
Service *string `mandatory:"false" contributesTo:"query" name:"service"`
// Scope to restrict access to resources.
// Example: `repository:namespace/reponame:pull,push`
Scope *string `mandatory:"false" contributesTo:"query" name:"scope"`
// Unique identifier for the request.
// If you need to contact Oracle about a particular request, please provide the request ID.
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
// Metadata about the request. This information will not be transmitted to the service, but
// represents information that the SDK will consume to drive retry behavior.
RequestMetadata common.RequestMetadata
}
func (request GetAccessTokenRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
BinaryRequestBody implements the OCIRequest interface
func (request GetAccessTokenRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (request GetAccessTokenRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request GetAccessTokenRequest) String() string
func (request GetAccessTokenRequest) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
GetAccessTokenResponse wrapper for the GetAccessToken operation
type GetAccessTokenResponse struct {
// The underlying http response
RawResponse *http.Response
// The AccessToken instance
AccessToken `presentIn:"body"`
// Unique Oracle-assigned identifier for the request. If you need to contact
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}
func (response GetAccessTokenResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (response GetAccessTokenResponse) String() string