config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHOPIFY_CURRENT_API_VERSION = `2025-01`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenResp

type AccessTokenResp struct {
	AccessToken string `json:"access_token"` // An API access token that can be used to access the shop’s data as long as your app is installed. Your app should store the token somewhere to make authenticated requests for a shop’s data. An offline access token can be used for as long as the app is installed.
	Scope       string `json:"scope"`        // The list of access scopes that were granted to your app and are associated with the access token.
}

type AuthorizationCodeResp

type AuthorizationCodeResp struct {
	Code      string `json:"code"`      // The authorization code provided in the redirect
	Hmac      string `json:"hmac"`      // Hmac for the rest of the objects
	Host      string `json:"host"`      // The base64 encoded hostname
	Shop      string `json:"shop"`      // Shop origin
	Timestamp int    `json:"timestamp"` // Timestamp
}

The response sent to the Redirect URI as query params

type Config

type Config struct {
	ClientID     string        `json:"client_id"`     // ClientID of the Shopify Application
	ClientSecret string        `json:"client_secret"` // ClientSecret of the Shopify Application
	ApiVersion   string        `json:"api_version"`   // API Version of the Shopify API. Default: `2025-01`
	Scopes       []string      `json:"scopes"`        // Permissible scopes
	AccessMode   string        `json:"access_mode"`   // Sets the access mode. "online" | "offline". Default: "offline".
	RedirectUrl  string        `json:"redirect_url"`  // Redirect URL for Authorization Code flow
	Timeout      time.Duration `json:"timeout"`       // Timeout to disconnect oauth client
}

Config holds the API client configuration

Jump to

Keyboard shortcuts

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