powerplatform

package
v1.0.0-preview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TryGetScopeFromURL

func TryGetScopeFromURL(url string) (string, error)

Types

type ApiClient

type ApiClient struct {
	Config   *config.ProviderConfig
	BaseAuth *Auth
}

func NewApiClientBase

func NewApiClientBase(config *config.ProviderConfig, baseAuth *Auth) *ApiClient

func (*ApiClient) DoWaitForLifecycleOperationStatus

func (client *ApiClient) DoWaitForLifecycleOperationStatus(ctx context.Context, response *ApiHttpResponse) (*LifecycleDto, error)

func (*ApiClient) Execute

func (client *ApiClient) Execute(ctx context.Context, method string, url string, headers http.Header, body interface{}, acceptableStatusCodes []int, responseObj interface{}) (*ApiHttpResponse, error)

func (*ApiClient) GetConfig

func (client *ApiClient) GetConfig() *config.ProviderConfig

type ApiHttpResponse

type ApiHttpResponse struct {
	Response    *http.Response
	BodyAsBytes []byte
}

func (*ApiHttpResponse) GetHeader

func (apiResponse *ApiHttpResponse) GetHeader(name string) string

func (*ApiHttpResponse) MarshallTo

func (apiResponse *ApiHttpResponse) MarshallTo(obj interface{}) error

func (*ApiHttpResponse) ValidateStatusCode

func (ApiHttpResponse *ApiHttpResponse) ValidateStatusCode(expectedStatusCode int) error

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

func NewAuthBase

func NewAuthBase(config *config.ProviderConfig) *Auth

func (*Auth) AuthenticateClientSecret

func (client *Auth) AuthenticateClientSecret(ctx context.Context, scopes []string) (string, time.Time, error)

func (*Auth) AuthenticateOIDC

func (client *Auth) AuthenticateOIDC(ctx context.Context, scopes []string) (string, time.Time, error)

func (*Auth) AuthenticateUsingCli

func (client *Auth) AuthenticateUsingCli(ctx context.Context, scopes []string) (string, time.Time, error)

func (*Auth) GetAuthority

func (client *Auth) GetAuthority(tenantid string) string

func (*Auth) GetTokenForScopes

func (client *Auth) GetTokenForScopes(ctx context.Context, scopes []string) (*string, error)

type LifecycleDto

type LifecycleDto struct {
	Id                 string                  `json:"id"`
	Links              LifecycleLinksDto       `json:"links"`
	State              LifecycleStateDto       `json:"state"`
	Type               LifecycleStateDto       `json:"type"`
	CreatedDateTime    string                  `json:"createdDateTime"`
	LastActionDateTime string                  `json:"lastActionDateTime"`
	RequestedBy        LifecycleRequestedByDto `json:"requestedBy"`
	Stages             []LifecycleStageDto     `json:"stages"`
}

type LifecycleLinkDto

type LifecycleLinkDto struct {
	Path string `json:"path"`
}

type LifecycleLinksDto

type LifecycleLinksDto struct {
	Self        LifecycleLinkDto `json:"self"`
	Environment LifecycleLinkDto `json:"environment"`
}

type LifecycleRequestedByDto

type LifecycleRequestedByDto struct {
	Id          string `json:"id"`
	DisplayName string `json:"displayName"`
	Type        string `json:"type"`
}

type LifecycleStageDto

type LifecycleStageDto struct {
	Id                  string            `json:"id"`
	Name                string            `json:"name"`
	State               LifecycleStateDto `json:"state"`
	FirstActionDateTime string            `json:"firstActionDateTime"`
	LastActionDateTime  string            `json:"lastActionDateTime"`
}

type LifecycleStateDto

type LifecycleStateDto struct {
	Id string `json:"id"`
}

type OidcCredential

type OidcCredential struct {
	// contains filtered or unexported fields
}

func NewOidcCredential

func NewOidcCredential(options *OidcCredentialOptions) (*OidcCredential, error)

func (*OidcCredential) GetToken

type OidcCredentialOptions

type OidcCredentialOptions struct {
	azcore.ClientOptions
	TenantID      string
	ClientID      string
	RequestToken  string
	RequestUrl    string
	Token         string
	TokenFilePath string
}

type ProviderClient

type ProviderClient struct {
	Config *config.ProviderConfig
	Api    *ApiClient
}

type TokenExpiredError

type TokenExpiredError struct {
	Message string
}

func (*TokenExpiredError) Error

func (e *TokenExpiredError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL