models

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth added in v0.1.9

type Auth struct {
	Email string `json:"email"`
}

Auth is ...

func (Auth) Validate added in v0.1.9

func (v Auth) Validate() error

Validate is ...

type Cart

type Cart struct {
	Core
	Email         string                `json:"email"`
	Cart          []CartProduct         `json:"cart,omitempty"`
	AmountTotal   int                   `json:"amount_total"`
	Currency      string                `json:"currency"`
	PaymentID     string                `json:"payment_id"`
	PaymentStatus litepay.Status        `json:"payment_status"`
	PaymentSystem litepay.PaymentSystem `json:"payment_system"`
}

Cart is ...

type CartPayment added in v0.1.9

type CartPayment struct {
	Email    string                `json:"email"`
	Provider litepay.PaymentSystem `json:"provider"`
	Products []CartProduct         `json:"products"`
}

CartPayment is ...

type CartProduct

type CartProduct struct {
	ProductID string `json:"id"`
	Quantity  int    `json:"quantity"`
}

CartProduct is ...

type Core

type Core struct {
	ID      string `json:"id"`
	Created int64  `json:"created"`
	Updated int64  `json:"updated,omitempty"`
}

Core is ...

type Data

type Data struct {
	ID      string `json:"id"`
	Content string `json:"content"`
	CartID  string `json:"cart_id"`
}

Data is ...

func (Data) Validate

func (v Data) Validate() error

Validate is ...

type Digital

type Digital struct {
	Type   string `json:"type"`
	Filled bool   `json:"filled,omitempty"`
	Files  []File `json:"files,omitempty"`
	Data   []Data `json:"data,omitempty"`
}

Digital is ...

func (Digital) Validate

func (v Digital) Validate() error

Validate is ...

type File

type File struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Ext      string `json:"ext"`
	OrigName string `json:"orig_name,omitempty"`
}

File is ...

func (File) Validate

func (v File) Validate() error

Validate is ...

type Install

type Install struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Domain   string `json:"domain"`
}

Install is ...

func (Install) Validate

func (v Install) Validate() error

Validate is ...

type JWT

type JWT struct {
	Secret      string `json:"secret"`
	ExpireHours int    `json:"expire_hours"`
}

JWT iss ...

func (JWT) Validate

func (v JWT) Validate() error

Validate is ...

type Letter

type Letter struct {
	Subject string `json:"subject"`
	Text    string `json:"text"`
	Html    string `json:"html"`
}

Letter ...

func (Letter) Validate added in v0.1.9

func (v Letter) Validate() error

Validate is ...

type Mail

type Mail struct {
	SenderName  string `json:"sender_name"`
	SenderEmail string `json:"sender_email"`
	SMTP        SMTP   `json:"smtp"`
}

Mail is ...

func (Mail) Validate

func (v Mail) Validate() error

Validate is ...

type Main

type Main struct {
	SiteName string `json:"site_name"`
	Domain   string `json:"domain"`
	Email    string `json:"email"`
}

Main is ...

func (Main) Validate

func (v Main) Validate() error

Validate is ...

type MessageMail added in v0.1.9

type MessageMail struct {
	To     string            `json:"to"`
	Letter Letter            `json:"letter"`
	Data   map[string]string `json:"data"`
	Files  []File            `json:"files,omitempty"`
}

MessageMail ...

func (MessageMail) Validate added in v0.1.9

func (v MessageMail) Validate() error

Validate is ...

type Metadata

type Metadata struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Metadata is ...

func (Metadata) Validate

func (v Metadata) Validate() error

Validate is ...

type Page

type Page struct {
	Core
	Name     string  `json:"name"`
	Slug     string  `json:"slug"`
	Position string  `json:"position,omitempty"`
	Content  *string `json:"content,omitempty"`
	Active   bool    `json:"active"`
	Seo      *Seo    `json:"seo,omitempty"`
}

Page is ...

func (Page) Validate

func (v Page) Validate() error

Validate is ...

type Password

type Password struct {
	Old string `json:"old"`
	New string `json:"new"`
}

Password is ..

func (Password) Validate

func (v Password) Validate() error

Validate is ...

type Payment added in v0.1.5

type Payment struct {
	Currency string `json:"currency"`
}

Payment is ...

func (Payment) Validate added in v0.1.9

func (v Payment) Validate() error

Validate is ...

type PaymentSystem added in v0.1.5

type PaymentSystem struct {
	Active      []string    `json:"active"`
	Stripe      Stripe      `json:"stripe"`
	Paypal      Paypal      `json:"paypal"`
	Spectrocoin Spectrocoin `json:"spectrocoin"`
}

PaymentSystem is ...

func (PaymentSystem) Validate added in v0.1.5

func (v PaymentSystem) Validate() error

Validate is ...

type Paypal added in v0.1.7

type Paypal struct {
	ClientID  string `json:"client_id"`
	SecretKey string `json:"secret_key"`
	Active    bool   `json:"active"`
}

Paypal is ...

func (Paypal) Validate added in v0.1.7

func (v Paypal) Validate() error

Validate is ...

type Product

type Product struct {
	Core
	Name        string     `json:"name"`
	Brief       string     `json:"brief,omitempty"`
	Description string     `json:"description,omitempty"`
	Images      []File     `json:"images,omitempty"`
	Slug        string     `json:"slug"`
	Amount      int        `json:"amount"`
	Metadata    []Metadata `json:"metadata,omitempty"`
	Attributes  []string   `json:"attributes,omitempty"`
	Digital     Digital    `json:"digital,omitempty"`
	Active      bool       `json:"active"`
	Seo         *Seo       `json:"seo,omitempty"`
}

Product is ...

func (Product) Validate

func (v Product) Validate() error

Validate is ...

type Products

type Products struct {
	Total    int       `json:"total"`
	Currency string    `json:"currency"`
	Products []Product `json:"products"`
}

Products is ...

type SMTP

type SMTP struct {
	Host       string `json:"host,omitempty"`
	Port       int    `json:"port,omitempty"`
	Encryption string `json:"encryption,omitempty"`
	Username   string `json:"username,omitempty"`
	Password   string `json:"password,omitempty"`
}

SMTP is ...

func (SMTP) Validate

func (v SMTP) Validate() error

Validate is ...

type Seo added in v0.1.3

type Seo struct {
	Title       string `json:"title"`
	Keywords    string `json:"keywords"`
	Description string `json:"description"`
}

Seo is ...

type SettingName

type SettingName struct {
	ID    string `json:"id,omitempty"`
	Key   string `json:"key"`
	Value any    `json:"value,omitempty"`
}

SettingName is ...

func (SettingName) Validate

func (v SettingName) Validate() error

Validate is ...

type SignIn

type SignIn struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

SignIn is ...

func (SignIn) Validate

func (v SignIn) Validate() error

Validate is ...

type Social

type Social struct {
	Facebook  string `json:"facebook,omitempty"`
	Instagram string `json:"instagram,omitempty"`
	Twitter   string `json:"twitter,omitempty"`
	Dribbble  string `json:"dribbble,omitempty"`
	Github    string `json:"github,omitempty"`
	Youtube   string `json:"youtube,omitempty"`
	Other     string `json:"other,omitempty"`
}

func (Social) Validate

func (v Social) Validate() error

Validate is ...

type Spectrocoin added in v0.1.5

type Spectrocoin struct {
	MerchantID string `json:"merchant_id"`
	ProjectID  string `json:"project_id"`
	PrivateKey string `json:"private_key"`
	Active     bool   `json:"active"`
}

Spectrocoin is ...

func (Spectrocoin) Validate added in v0.1.5

func (v Spectrocoin) Validate() error

Validate is ...

type Stripe

type Stripe struct {
	SecretKey string `json:"secret_key"`
	Active    bool   `json:"active"`
}

Stripe is ...

func (Stripe) Validate

func (v Stripe) Validate() error

Validate is ...

type UpdateClause

type UpdateClause struct {
	Field string
	Value string
}

UpdateClause is ...

type Webhook added in v0.1.5

type Webhook struct {
	Url string `json:"url"`
}

func (Webhook) Validate added in v0.1.5

func (v Webhook) Validate() error

Validate is ...

Jump to

Keyboard shortcuts

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