...

Package containerregistry

import "github.com/oracle/oci-go-sdk/containerregistry"
Overview
Index

Overview ▾

Index ▾

Package files

access_token.go containerregistry_client.go get_access_token_request_response.go

type AccessToken

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 (AccessToken) String

func (m AccessToken) String() string

func (AccessToken) ValidateEnumValue

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

type ContainerRegistryClient

ContainerRegistryClient a client for ContainerRegistry

type ContainerRegistryClient struct {
    common.BaseClient
    // contains filtered or unexported fields
}

func NewContainerRegistryClientWithConfigurationProvider

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

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 (*ContainerRegistryClient) ConfigurationProvider

func (client *ContainerRegistryClient) ConfigurationProvider() *common.ConfigurationProvider

ConfigurationProvider the ConfigurationProvider used in this client, or null if none set

func (ContainerRegistryClient) GetAccessToken

func (client ContainerRegistryClient) GetAccessToken(ctx context.Context, request GetAccessTokenRequest) (response GetAccessTokenResponse, err error)

GetAccessToken Get a token using basic auth credentials or signature headers

See also

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 (*ContainerRegistryClient) SetRegion

func (client *ContainerRegistryClient) SetRegion(region string)

SetRegion overrides the region of this client.

type GetAccessTokenRequest

GetAccessTokenRequest wrapper for the GetAccessToken operation

See also

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 (GetAccessTokenRequest) BinaryRequestBody

func (request GetAccessTokenRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)

BinaryRequestBody implements the OCIRequest interface

func (GetAccessTokenRequest) HTTPRequest

func (request GetAccessTokenRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (GetAccessTokenRequest) RetryPolicy

func (request GetAccessTokenRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (GetAccessTokenRequest) String

func (request GetAccessTokenRequest) String() string

func (GetAccessTokenRequest) ValidateEnumValue

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

type GetAccessTokenResponse

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 (GetAccessTokenResponse) HTTPResponse

func (response GetAccessTokenResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (GetAccessTokenResponse) String

func (response GetAccessTokenResponse) String() string