admin_sdk

package
v0.0.0-...-9ec4a45 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

type Client

type Client struct {
	ShopwareVersion *version.Version

	Info             *InfoService
	ExtensionManager *ExtensionManagerService
	CacheManager     *CacheManagerService
	// contains filtered or unexported fields
}

func NewApiClient

func NewApiClient(ctx context.Context, shopUrl string, credentials OAuthCredentials, httpClient *http.Client) (*Client, error)

func (*Client) BareDo

func (c *Client) BareDo(ctx context.Context, req *http.Request) (*http.Response, error)

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)

func (*Client) NewRawRequest

func (c *Client) NewRawRequest(context ApiContext, method, urlStr string, body io.Reader) (*http.Request, error)

func (*Client) NewRequest

func (c *Client) NewRequest(context ApiContext, method, urlStr string, body interface{}) (*http.Request, error)

func (*Client) Token

func (c *Client) Token() oauth2.TokenSource

type ClientService

type ClientService struct {
	Client *Client
}

type ErrorDetail

type ErrorDetail struct {
	Code   string `json:"code"`
	Status string `json:"status"`
	Title  string `json:"title"`
	Detail string `json:"detail"`
}

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 (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

type IntegrationCredentials

type IntegrationCredentials struct {
	ClientId     string
	ClientSecret string
	Scopes       []string
}

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 OAuthCredentials interface {
	GetTokenSource(ctx context.Context, tokenURL string) (oauth2.TokenSource, error)
}

type PasswordCredentials

type PasswordCredentials struct {
	Username string
	Password string
	Scopes   []string
}

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

Jump to

Keyboard shortcuts

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