qor

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 3 Imported by: 361

README

QOR

English Chat Room:

中文聊天室:

Build Status

For security issues, please send us an email to security@getqor.com and give us time to respond BEFORE posting as an issue or reporting on public forums.

What is QOR?

QOR is a set of libraries written in Go that abstracts common features needed for business applications, CMSs, and E-commerce systems.

This is a complete rewrite in Go, of the original QOR, which was a proprietary framework written in Ruby on Rails and used internally at The Plant. QOR 1.0 is the first version to be open sourced and distributed under the MIT license.

What QOR is not

QOR is not a "boxed turnkey solution". You need proper coding skills to use it. It's designed to make the lives of developers easier when building complex EC systems, not providing you one out of the box.

Documentation

https://doc.getqor.com/

The modules

  • Admin - The core part of QOR system, will generate an admin interface and RESTFul API for you to manage your data

  • Publish - Providing a staging environment for all content changes to be reviewed before being published to the live system

  • Transition - A configurable State Machine: define states, events (eg. pay order), and validation constraints for state transitions

  • Media Library - Asset Management with support for several cloud storage backends and publishing via a CDN

  • Worker (Batch processing) - A process scheduler

  • Exchange - Data exchange with other business applications using CSV or Excel data

  • Internationalization (i18n) - Managing and (inline) editing of translations

  • Localization (l10n) - Manage DB-backed models on per-locale basis, with support for defining/editing localizable attributes, and locale-based querying

  • Roles - Access Control

  • And more https://github.com/qor

Live DEMO

Frontend Development

Requires Node.js and Gulp for building frontend files

npm install && npm install -g gulp
  • Watch SCSS/JavaScript changes: gulp
  • Build Release files: gulp release

License

Released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB *gorm.DB
}

Config qor config struct

type Context

type Context struct {
	Request     *http.Request
	Writer      http.ResponseWriter
	CurrentUser CurrentUser
	Roles       []string
	ResourceID  string
	DB          *gorm.DB
	Config      *Config
	Errors
}

Context qor context, which is used for many qor components, used to share information between them

func (*Context) Clone

func (context *Context) Clone() *Context

Clone clone current context

func (*Context) GetDB

func (context *Context) GetDB() *gorm.DB

GetDB get db from current context

func (*Context) SetDB

func (context *Context) SetDB(db *gorm.DB)

SetDB set db into current context

type CurrentUser

type CurrentUser interface {
	DisplayName() string
}

CurrentUser is an interface, which is used for qor admin to get current logged user

type Errors

type Errors struct {
	// contains filtered or unexported fields
}

Errors is a struct that used to hold errors array

func (*Errors) AddError

func (errs *Errors) AddError(errors ...error)

AddError add error to Errors struct

func (Errors) Error

func (errs Errors) Error() string

Error get formatted error message

func (Errors) GetErrors

func (errs Errors) GetErrors() []error

GetErrors return error array

func (Errors) HasError

func (errs Errors) HasError() bool

HasError return has error or not

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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