Documentation
¶
Index ¶
- type ApiContext
- type CacheManagerService
- type Client
- func (c *Client) BareDo(ctx context.Context, req *http.Request) (*http.Response, error)
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) NewRawRequest(context ApiContext, method, urlStr string, body io.Reader) (*http.Request, error)
- func (c *Client) NewRequest(context ApiContext, method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) Token() oauth2.TokenSource
- type ClientService
- type ErrorDetail
- type Extension
- type ExtensionDetail
- type ExtensionList
- type ExtensionManagerService
- func (e ExtensionManagerService) ActivateExtension(ctx ApiContext, extType, name string) (*http.Response, error)
- func (e ExtensionManagerService) DeactivateExtension(ctx ApiContext, extType, name string) (*http.Response, error)
- func (e ExtensionManagerService) DownloadExtension(ctx ApiContext, name string) (*http.Response, error)
- func (e ExtensionManagerService) InstallExtension(ctx ApiContext, extType, name string) (*http.Response, error)
- func (e ExtensionManagerService) ListAvailableExtensions(ctx ApiContext) (ExtensionList, *http.Response, error)
- func (e ExtensionManagerService) Refresh(ctx ApiContext) (*http.Response, error)
- func (e ExtensionManagerService) RemoveExtension(ctx ApiContext, extType, name string) (*http.Response, error)
- func (e ExtensionManagerService) UninstallExtension(ctx ApiContext, extType, name string) (*http.Response, error)
- func (e ExtensionManagerService) UpdateExtension(ctx ApiContext, extType, name string) (*http.Response, error)
- func (e ExtensionManagerService) UploadExtension(ctx ApiContext, extensionZip io.Reader) (*http.Response, error)
- func (e ExtensionManagerService) UploadExtensionUpdateToCloud(ctx ApiContext, extensionName string, extensionZip io.Reader) (*http.Response, error)
- type InfoResponse
- type InfoService
- type IntegrationCredentials
- type OAuthCredentials
- type PasswordCredentials
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiContext ¶
type ApiContext struct {
//nolint:containedctx
Context context.Context
LanguageId string
VersionId string
SkipFlows bool
Inheritance bool
}
func NewApiContext ¶
func NewApiContext(ctx context.Context) ApiContext
type CacheManagerService ¶
type CacheManagerService ClientService
func (CacheManagerService) Clear ¶
func (m CacheManagerService) Clear(ctx ApiContext) (*http.Response, error)
type Client ¶
type Client struct {
ShopwareVersion *version.Version
Info *InfoService
ExtensionManager *ExtensionManagerService
CacheManager *CacheManagerService
// contains filtered or unexported fields
}
func NewApiClient ¶
func (*Client) NewRawRequest ¶
func (*Client) NewRequest ¶
func (*Client) Token ¶
func (c *Client) Token() oauth2.TokenSource
type ClientService ¶
type ClientService struct {
Client *Client
}
type ErrorDetail ¶
type Extension ¶
type Extension = ExtensionDetail
type ExtensionDetail ¶
type ExtensionDetail struct {
Extensions []interface{} `json:"extensions"`
Id interface{} `json:"id"`
LocalId string `json:"localId"`
Name string `json:"name"`
Label string `json:"label"`
Description string `json:"description"`
ShortDescription interface{} `json:"shortDescription"`
ProducerName string `json:"producerName"`
License string `json:"license"`
Version string `json:"version"`
LatestVersion string `json:"latestVersion"`
Languages []interface{} `json:"languages"`
Rating interface{} `json:"rating"`
NumberOfRatings int `json:"numberOfRatings"`
Variants []interface{} `json:"variants"`
Faq []interface{} `json:"faq"`
Binaries []interface{} `json:"binaries"`
Images []interface{} `json:"images"`
Icon interface{} `json:"icon"`
IconRaw *string `json:"iconRaw"`
Categories []interface{} `json:"categories"`
Permissions interface{} `json:"permissions"`
Active bool `json:"active"`
Type string `json:"type"`
IsTheme bool `json:"isTheme"`
Configurable bool `json:"configurable"`
PrivacyPolicyExtension interface{} `json:"privacyPolicyExtension"`
StoreLicense interface{} `json:"storeLicense"`
StoreExtension interface{} `json:"storeExtension"`
InstalledAt *struct {
Date string `json:"date"`
TimezoneType int `json:"timezone_type"`
Timezone string `json:"timezone"`
} `json:"installedAt"`
UpdatedAt interface{} `json:"updatedAt"`
Notices []interface{} `json:"notices"`
Source string `json:"source"`
UpdateSource string `json:"updateSource"`
}
func (ExtensionDetail) IsPlugin ¶
func (e ExtensionDetail) IsPlugin() bool
func (ExtensionDetail) IsUpdateAble ¶
func (e ExtensionDetail) IsUpdateAble() bool
func (ExtensionDetail) Status ¶
func (e ExtensionDetail) Status() string
type ExtensionList ¶
type ExtensionList []*ExtensionDetail
func (ExtensionList) FilterByUpdateable ¶
func (l ExtensionList) FilterByUpdateable() ExtensionList
func (ExtensionList) GetByName ¶
func (l ExtensionList) GetByName(name string) *ExtensionDetail
type ExtensionManagerService ¶
type ExtensionManagerService ClientService
func (ExtensionManagerService) ActivateExtension ¶
func (e ExtensionManagerService) ActivateExtension(ctx ApiContext, extType, name string) (*http.Response, error)
func (ExtensionManagerService) DeactivateExtension ¶
func (e ExtensionManagerService) DeactivateExtension(ctx ApiContext, extType, name string) (*http.Response, error)
func (ExtensionManagerService) DownloadExtension ¶
func (e ExtensionManagerService) DownloadExtension(ctx ApiContext, name string) (*http.Response, error)
func (ExtensionManagerService) InstallExtension ¶
func (e ExtensionManagerService) InstallExtension(ctx ApiContext, extType, name string) (*http.Response, error)
func (ExtensionManagerService) ListAvailableExtensions ¶
func (e ExtensionManagerService) ListAvailableExtensions(ctx ApiContext) (ExtensionList, *http.Response, error)
func (ExtensionManagerService) Refresh ¶
func (e ExtensionManagerService) Refresh(ctx ApiContext) (*http.Response, error)
func (ExtensionManagerService) RemoveExtension ¶
func (e ExtensionManagerService) RemoveExtension(ctx ApiContext, extType, name string) (*http.Response, error)
func (ExtensionManagerService) UninstallExtension ¶
func (e ExtensionManagerService) UninstallExtension(ctx ApiContext, extType, name string) (*http.Response, error)
func (ExtensionManagerService) UpdateExtension ¶
func (e ExtensionManagerService) UpdateExtension(ctx ApiContext, extType, name string) (*http.Response, error)
func (ExtensionManagerService) UploadExtension ¶
func (e ExtensionManagerService) UploadExtension(ctx ApiContext, extensionZip io.Reader) (*http.Response, error)
func (ExtensionManagerService) UploadExtensionUpdateToCloud ¶
func (e ExtensionManagerService) UploadExtensionUpdateToCloud(ctx ApiContext, extensionName string, extensionZip io.Reader) (*http.Response, error)
type InfoResponse ¶
type InfoResponse struct {
Version string `json:"version"`
VersionRevision string `json:"versionRevision"`
AdminWorker struct {
EnableAdminWorker bool `json:"enableAdminWorker"`
Transports []string `json:"transports"`
} `json:"adminWorker"`
Bundles map[string]infoResponseBundle `json:"bundles"`
Settings struct {
EnableURLFeature bool `json:"enableUrlFeature"`
} `json:"settings"`
}
func (InfoResponse) IsCloudShop ¶
func (r InfoResponse) IsCloudShop() bool
type InfoService ¶
type InfoService ClientService
func (InfoService) Info ¶
func (s InfoService) Info(ctx ApiContext) (*InfoResponse, *http.Response, error)
type IntegrationCredentials ¶
func NewIntegrationCredentials ¶
func NewIntegrationCredentials(clientId, clientSecret string, scopes []string) IntegrationCredentials
func (IntegrationCredentials) GetTokenSource ¶
func (c IntegrationCredentials) GetTokenSource(ctx context.Context, tokenURL string) (oauth2.TokenSource, error)
type OAuthCredentials ¶
type PasswordCredentials ¶
func NewPasswordCredentials ¶
func NewPasswordCredentials(username, password string, scopes []string) PasswordCredentials
func (PasswordCredentials) GetTokenSource ¶
func (c PasswordCredentials) GetTokenSource(ctx context.Context, tokenURL string) (oauth2.TokenSource, error)
type ResponseError ¶
type ResponseError struct {
Response *http.Response
Content string
Errors []ErrorDetail `json:"errors"`
}
func (ResponseError) Error ¶
func (r ResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.