Documentation
¶
Index ¶
- Constants
- Variables
- type Address
- type Category
- func (c *Category) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (c *Category) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (c *Category) PermissionRN() []string
- func (c *Category) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (c *Category) PrimarySlug() string
- type Customer
- type InputDemo
- type L10nModel
- type L10nModelWithVersion
- func (lmv *L10nModelWithVersion) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (lmv *L10nModelWithVersion) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (lmv *L10nModelWithVersion) PermissionRN() []string
- func (lmv *L10nModelWithVersion) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (lmv *L10nModelWithVersion) PrimarySlug() string
- type ListModel
- func (this ListModel) GetListContent(db *gorm.DB, onePageItems *publish.OnePageItems) string
- func (this ListModel) GetListUrl(pageNumber string) string
- func (this *ListModel) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (this *ListModel) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (this *ListModel) PermissionRN() []string
- func (this *ListModel) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (this *ListModel) PrimarySlug() string
- func (this ListModel) Sort(array []interface{})
- type MembershipCard
- type Order
- type OrderItem
- type OrderStatus
- type Phone
- type Post
- func (p *Post) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (p *Post) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (p *Post) PermissionRN() []string
- func (p *Post) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (p *Post) PrimarySlug() string
- type Product
- func (p *Product) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (p *Product) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
- func (p *Product) PermissionRN() []string
- func (p *Product) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (p *Product) PrimarySlug() string
- type SliceListModel
- type User
Constants ¶
View Source
const ( OrderStatus_Pending OrderStatus = "Pending" OrderStatus_Authorised OrderStatus = "Authorised" OrderStatus_Cancelled OrderStatus = "Cancelled" OrderStatus_AuthUnknown OrderStatus = "AuthUnknown" OrderStatus_Sending OrderStatus = "Sending" OrderStatus_CheckedIn OrderStatus = "CheckedIn" OrderStatus_Refunded OrderStatus = "Refunded" OrderStatus_Validating OrderStatus = "Validating" OrderStatus_Paid OrderStatus = "Paid" OrderStatusColor_Grey = "#e0e0e0" OrderStatusColor_Orange = "#ffa600" OrderStatusColor_Blue = "#2194f3" OrderStatusColor_Green = "#4caf4f" OrderStatusColor_Purple = "#4a148c" OrderStatusColor_Brown = "#9f6d6d" OrderStatusColor_Red = "#f44336" )
View Source
const ( RoleAdmin = "Admin" RoleManager = "Manager" RoleEditor = "Editor" RoleViewer = "Viewer" OAuthProviderGoogle = "google" OAuthProviderMicrosoftOnline = "microsoftonline" OAuthProviderGithub = "github" StatusActive = "active" StatusInactive = "inactive" )
Variables ¶
View Source
var DefaultRoles = []string{ RoleAdmin, RoleManager, RoleEditor, RoleViewer, }
View Source
var OAuthProviders = []string{ OAuthProviderGoogle, OAuthProviderMicrosoftOnline, OAuthProviderGithub, }
View Source
var OrderStatusColorMap = map[OrderStatus]string{ OrderStatus_Pending: OrderStatusColor_Grey, OrderStatus_Authorised: OrderStatusColor_Blue, OrderStatus_Cancelled: OrderStatusColor_Red, OrderStatus_AuthUnknown: OrderStatusColor_Red, OrderStatus_Sending: OrderStatusColor_Orange, OrderStatus_CheckedIn: OrderStatusColor_Green, OrderStatus_Refunded: OrderStatusColor_Purple, OrderStatus_Validating: OrderStatusColor_Orange, OrderStatus_Paid: OrderStatusColor_Blue, }
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
gorm.Model
Name string
Products pq.StringArray `gorm:"type:text[]"`
publish.Status
publish.Schedule
publish.Version
}
func (*Category) GetPublishActions ¶
func (c *Category) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*Category) GetUnPublishActions ¶
func (c *Category) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*Category) PermissionRN ¶
func (*Category) PrimaryColumnValuesBySlug ¶
func (*Category) PrimarySlug ¶
type Customer ¶
type Customer struct {
ID uint `gorm:"primarykey"`
Name string
Addresses []*Address
MembershipCard *MembershipCard
}
type InputDemo ¶
type InputDemo struct {
ID uint
TextField1 string
TextArea1 string
Switch1 bool
Slider1 int
Select1 string
RangeSlider1 pq.Int64Array `gorm:"type:integer[]"`
Radio1 string
FileInput1 string
Combobox1 string
Checkbox1 bool
Autocomplete1 pq.StringArray `gorm:"type:text[]"`
ButtonGroup1 string
ChipGroup1 string
ItemGroup1 string
ListItemGroup1 string
SlideGroup1 string
ColorPicker1 string
DatePicker1 string
DatePickerMonth1 string
TimePicker1 string
MediaLibrary1 media_library.MediaBox `sql:"type:text;"`
UpdatedAt time.Time
CreatedAt time.Time
}
type L10nModel ¶
func (*L10nModel) PermissionRN ¶
func (*L10nModel) PrimaryColumnValuesBySlug ¶
func (*L10nModel) PrimarySlug ¶
type L10nModelWithVersion ¶
type L10nModelWithVersion struct {
gorm.Model
Title string
publish.Status
publish.Version
publish.Schedule
l10n.Locale
}
func (*L10nModelWithVersion) GetPublishActions ¶
func (lmv *L10nModelWithVersion) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*L10nModelWithVersion) GetUnPublishActions ¶
func (lmv *L10nModelWithVersion) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*L10nModelWithVersion) PermissionRN ¶
func (lmv *L10nModelWithVersion) PermissionRN() []string
func (*L10nModelWithVersion) PrimaryColumnValuesBySlug ¶
func (lmv *L10nModelWithVersion) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*L10nModelWithVersion) PrimarySlug ¶
func (lmv *L10nModelWithVersion) PrimarySlug() string
type ListModel ¶
type ListModel struct {
gorm.Model
Title string
publish.Status
publish.Schedule
publish.List
publish.Version
}
func (ListModel) GetListContent ¶
func (ListModel) GetListUrl ¶
func (*ListModel) GetPublishActions ¶
func (this *ListModel) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*ListModel) GetUnPublishActions ¶
func (this *ListModel) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*ListModel) PermissionRN ¶
func (*ListModel) PrimaryColumnValuesBySlug ¶
func (*ListModel) PrimarySlug ¶
type MembershipCard ¶
type OrderStatus ¶
type OrderStatus string
type Post ¶
type Post struct {
gorm.Model
Title string
TitleWithSlug string
Seo seo.Setting
Body string
HeroImage media_library.MediaBox `sql:"type:text;"`
BodyImage media_library.MediaBox `sql:"type:text;"`
UpdatedAt time.Time
CreatedAt time.Time
publish.Status
publish.Schedule
publish.Version
}
func (*Post) GetPublishActions ¶
func (p *Post) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*Post) GetUnPublishActions ¶
func (p *Post) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*Post) PermissionRN ¶
func (*Post) PrimaryColumnValuesBySlug ¶
func (*Post) PrimarySlug ¶
type Product ¶
type Product struct {
gorm.Model
Code string
Name string
Price int
Image media_library.MediaBox `sql:"type:text;"`
publish.Status
publish.Schedule
publish.Version
}
func (*Product) GetPublishActions ¶
func (p *Product) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*Product) GetUnPublishActions ¶
func (p *Product) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*Product) PermissionRN ¶
func (*Product) PrimaryColumnValuesBySlug ¶
func (*Product) PrimarySlug ¶
type SliceListModel ¶
type SliceListModel []*ListModel
func (SliceListModel) Len ¶
func (x SliceListModel) Len() int
func (SliceListModel) Less ¶
func (x SliceListModel) Less(i, j int) bool
func (SliceListModel) Swap ¶
func (x SliceListModel) Swap(i, j int)
type User ¶
type User struct {
gorm.Model
Name string
Company string
Roles []role.Role `gorm:"many2many:user_role_join;"`
Status string
UpdatedAt time.Time
CreatedAt time.Time
FavorPostID uint
RegistrationDate time.Time `gorm:"type:date"`
// Username is email
login.UserPass
login.OAuthInfo
login.SessionSecure
}
func (User) IsOAuthUser ¶
Click to show internal directories.
Click to hide internal directories.