64 lines
2.0 KiB
Go
64 lines
2.0 KiB
Go
// Code generated by concurry DO NOT EDIT.
|
|
// https://github.com/angelbeltran/concurry
|
|
// concurry
|
|
package etsy
|
|
|
|
import (
|
|
"context"
|
|
"github.com/google/uuid"
|
|
"net/url"
|
|
"time"
|
|
)
|
|
|
|
type PlatformWithContext struct {
|
|
ctx context.Context
|
|
*Platform
|
|
}
|
|
|
|
func NewPlatformWithContext(ctx context.Context, v *Platform) *PlatformWithContext {
|
|
return &PlatformWithContext{
|
|
ctx: ctx,
|
|
Platform: v,
|
|
}
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) GenerateConnectionURLForNewAccount(acctID int64) (*url.URL, error) {
|
|
return v_ctx.Platform.GenerateConnectionURLForNewAccount(v_ctx.ctx, acctID)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) HandleNewAuthCode(acctID int64, state string, authCode string) (bool, error) {
|
|
return v_ctx.Platform.HandleNewAuthCode(v_ctx.ctx, acctID, state, authCode)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) parseAccessCodeResponseBody(body []byte) (string, string, time.Time, int64, error) {
|
|
return v_ctx.Platform.parseAccessCodeResponseBody(v_ctx.ctx, body)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) getNewUserShopID(accessToken string, userID int64) (int64, error) {
|
|
return v_ctx.Platform.getNewUserShopID(v_ctx.ctx, accessToken, userID)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) GetUserPointerByAccountID(acctID int64) (*EtsyUser, error) {
|
|
return v_ctx.Platform.GetUserPointerByAccountID(v_ctx.ctx, acctID)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) saveNewEtsyUser(user EtsyUser, tokens etsyAccessTokens) error {
|
|
return v_ctx.Platform.saveNewEtsyUser(v_ctx.ctx, user, tokens)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) createNewOAuthRequest(acctID int64) (oauth2Request, error) {
|
|
return v_ctx.Platform.createNewOAuthRequest(v_ctx.ctx, acctID)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) getOauthRequest(state uuid.UUID) (oauth2Request, bool, error) {
|
|
return v_ctx.Platform.getOauthRequest(v_ctx.ctx, state)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) InvalidateState(state string) error {
|
|
return v_ctx.Platform.InvalidateState(v_ctx.ctx, state)
|
|
}
|
|
|
|
func (v_ctx *PlatformWithContext) deleteOauthRequest(state uuid.UUID) error {
|
|
return v_ctx.Platform.deleteOauthRequest(v_ctx.ctx, state)
|
|
}
|