service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFileFromStorage

func DeleteFileFromStorage(objectKey string) bool

func UploadFileToStorage

func UploadFileToStorage(user string, tag string, parent string, fullFilePath string, fileBytes []byte) (string, string)

Types

type Payment

type Payment struct {
	Owner       string `xorm:"varchar(100) notnull pk" json:"owner"`
	Name        string `xorm:"varchar(100) notnull pk" json:"name"`
	CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
	DisplayName string `xorm:"varchar(100)" json:"displayName"`

	Provider           string `xorm:"varchar(100)" json:"provider"`
	Type               string `xorm:"varchar(100)" json:"type"`
	Organization       string `xorm:"varchar(100)" json:"organization"`
	User               string `xorm:"varchar(100)" json:"user"`
	ProductName        string `xorm:"varchar(100)" json:"productName"`
	ProductDisplayName string `xorm:"varchar(100)" json:"productDisplayName"`

	Detail   string  `xorm:"varchar(100)" json:"detail"`
	Tag      string  `xorm:"varchar(100)" json:"tag"`
	Currency string  `xorm:"varchar(100)" json:"currency"`
	Price    float64 `json:"price"`

	PayUrl    string `xorm:"varchar(2000)" json:"payUrl"`
	ReturnUrl string `xorm:"varchar(1000)" json:"returnUrl"`
	State     string `xorm:"varchar(100)" json:"state"`
	Message   string `xorm:"varchar(1000)" json:"message"`

	PersonName    string `xorm:"varchar(100)" json:"personName"`
	PersonIdCard  string `xorm:"varchar(100)" json:"personIdCard"`
	PersonEmail   string `xorm:"varchar(100)" json:"personEmail"`
	PersonPhone   string `xorm:"varchar(100)" json:"personPhone"`
	InvoiceType   string `xorm:"varchar(100)" json:"invoiceType"`
	InvoiceTitle  string `xorm:"varchar(100)" json:"invoiceTitle"`
	InvoiceTaxId  string `xorm:"varchar(100)" json:"invoiceTaxId"`
	InvoiceRemark string `xorm:"varchar(100)" json:"invoiceRemark"`
	InvoiceUrl    string `xorm:"varchar(255)" json:"invoiceUrl"`
}

func GetGlobalPayments

func GetGlobalPayments() ([]*Payment, error)

func GetPayments

func GetPayments(user string) ([]*Payment, error)

type Product

type Product struct {
	Owner       string `xorm:"varchar(100) notnull pk" json:"owner"`
	Name        string `xorm:"varchar(100) notnull pk" json:"name"`
	CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
	DisplayName string `xorm:"varchar(100)" json:"displayName"`

	Image     string   `xorm:"varchar(100)" json:"image"`
	Detail    string   `xorm:"varchar(100)" json:"detail"`
	Tag       string   `xorm:"varchar(100)" json:"tag"`
	Currency  string   `xorm:"varchar(100)" json:"currency"`
	Price     float64  `json:"price"`
	Quantity  int      `json:"quantity"`
	Sold      int      `json:"sold"`
	Providers []string `xorm:"varchar(100)" json:"providers"`
	ReturnUrl string   `xorm:"varchar(1000)" json:"returnUrl"`

	State string `xorm:"varchar(100)" json:"state"`
}

func GetProducts

func GetProducts() ([]*Product, error)

Jump to

Keyboard shortcuts

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