subscription

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SubscriptionDoesNotExist  = errors.New("subscription does not exist")
	PlanDoesNotExist          = errors.New("plan does not exist")
	UserDoesNotExist          = errors.New("user does not exist")
	PaymentCancelled          = errors.New("subscription was cancelled")
	FailedToDecodeRequestBody = errors.New("failed to decode request body")
	FailedToCreateCustomer    = errors.New("failed to create customer")
	FailedToCreateUser        = errors.New("failed to create user")
	OnlyOneOfUserBuyerAllowed = errors.New("only one of user buyer allowed")
	CannotChangeUser          = errors.New("subscription user cannot be changed")
)

Functions

func GetSubscribe

func GetSubscribe(c *gin.Context)

func Route

func Route(router router.Router, args ...gin.HandlerFunc)

func Subscribe

func Subscribe(c *gin.Context)

func Unsubscribe

func Unsubscribe(c *gin.Context)

func UpdateSubscribe

func UpdateSubscribe(c *gin.Context)

Types

type SubscriptionReq

type SubscriptionReq struct {
	User_         *user.User                 `json:"user"`
	Subscription_ *subscription.Subscription `json:"subscription"`
	Db            *datastore.Datastore
}

func (*SubscriptionReq) Subscription

func (sr *SubscriptionReq) Subscription() (*subscription.Subscription, error)

func (*SubscriptionReq) User

func (sr *SubscriptionReq) User() (*user.User, error)

Jump to

Keyboard shortcuts

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