Documentation ¶
Index ¶
- Constants
- func NewTree() *tree
- type ErrorCode
- type ErrorDocument
- type FilterInfo
- type HabtmValues
- type ListDocument
- type OrderingInfo
- type PaginationInfo
- type PathTree
- type RecordService
- func (rs *RecordService) BeginTransaction() (*sql.Tx, error)
- func (rs *RecordService) CommitTransaction(tx *sql.Tx) error
- func (rs *RecordService) Create(tx *sql.Tx, tableName string, params map[string][]string, ...) (interface{}, error)
- func (rs *RecordService) Delete(tx *sql.Tx, tableName string, params map[string][]string, args ...interface{}) (interface{}, error)
- func (rs *RecordService) GetType(table string) string
- func (rs *RecordService) HasTable(table string) bool
- func (rs *RecordService) Increment(tx *sql.Tx, tableName string, params map[string][]string, args ...interface{}) (interface{}, error)
- func (rs *RecordService) List(tableName string, params map[string][]string) *ListDocument
- func (rs *RecordService) Ping() int
- func (rs *RecordService) Read(tx *sql.Tx, tableName string, params map[string][]string, id ...interface{}) (interface{}, error)
- func (rs *RecordService) RollBackTransaction(tx *sql.Tx) error
- func (rs *RecordService) Update(tx *sql.Tx, tableName string, params map[string][]string, args ...interface{}) (interface{}, error)
- type RelationJoiner
Constants ¶
View Source
const ARGUMENT_COUNT_MISMATCH = 1002
View Source
const AUTHENTICATION_FAILED = 1012
View Source
const AUTHENTICATION_REQUIRED = 1011
View Source
const BAD_OR_MISSING_XSRF_TOKEN = 1017
View Source
const COLUMN_ALREADY_EXISTS = 1007
View Source
const COLUMN_NOT_FOUND = 1005
View Source
const CONFLICT = 409
View Source
const DATA_INTEGRITY_VIOLATION = 1010
View Source
const DEFAULT_PAGE_SIZE = 20
View Source
const DUPLICATE_KEY_EXCEPTION = 1009
View Source
const ERROR_NOT_FOUND = 9999
View Source
const FAILED_DEPENDENCY = 424
View Source
const FORBIDDEN = 403
View Source
const FOUND = 302
View Source
const HTTP_MESSAGE_NOT_READABLE = 1008
View Source
const INPUT_VALIDATION_FAILED = 1013
View Source
const INTERNAL_SERVER_ERROR = 500
View Source
const METHOD_NOT_ALLOWED = 405
View Source
const MOVED_PERMANENTLY = 301
View Source
const NOT_FOUND = 404
View Source
const OK = 200
View Source
const ONLY_AJAX_REQUESTS_ALLOWED = 1018
View Source
const OPERATION_FORBIDDEN = 1014
View Source
const OPERATION_NOT_SUPPORTED = 1015
View Source
const ORIGIN_FORBIDDEN = 1004
View Source
const PAGINATION_FORBIDDEN = 1019
View Source
const PASSWORD_TOO_SHORT = 1021
View Source
const RECORD_NOT_FOUND = 1003
View Source
const ROUTE_NOT_FOUND = 1000
View Source
const TABLE_ALREADY_EXISTS = 1006
View Source
const TABLE_NOT_FOUND = 1001
View Source
const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016
View Source
const UNAUTHORIZED = 401
View Source
const UNPROCESSABLE_ENTITY = 422
View Source
const USER_ALREADY_EXIST = 1020
View Source
const WILDCARD = `*`
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorCode ¶
type ErrorCode struct {
// contains filtered or unexported fields
}
func NewErrorCode ¶
func (*ErrorCode) GetMessage ¶
type ErrorDocument ¶
type ErrorDocument struct {
// contains filtered or unexported fields
}
func NewErrorDocument ¶
func NewErrorDocument(errorCode *ErrorCode, argument string, details interface{}) *ErrorDocument
func NewErrorDocumentFromError ¶
func NewErrorDocumentFromError(err error, debug bool) *ErrorDocument
func (*ErrorDocument) GetCode ¶
func (ed *ErrorDocument) GetCode() int
func (*ErrorDocument) GetMessage ¶
func (ed *ErrorDocument) GetMessage() string
func (*ErrorDocument) GetStatus ¶
func (ed *ErrorDocument) GetStatus() int
func (*ErrorDocument) MarshalJSON ¶
func (ed *ErrorDocument) MarshalJSON() ([]byte, error)
json marshaling for struct ErrorDocument
func (*ErrorDocument) Serialize ¶
func (ed *ErrorDocument) Serialize() map[string]interface{}
type FilterInfo ¶
type FilterInfo struct { }
func (*FilterInfo) GetCombinedConditions ¶
func (ft *FilterInfo) GetCombinedConditions(table *database.ReflectedTable, params map[string][]string) interface{ database.Condition }
type HabtmValues ¶
type ListDocument ¶
type ListDocument struct {
// contains filtered or unexported fields
}
func NewListDocument ¶
func NewListDocument(records []map[string]interface{}, results int) *ListDocument
func (*ListDocument) GetRecords ¶
func (l *ListDocument) GetRecords() []map[string]interface{}
func (*ListDocument) GetResults ¶
func (l *ListDocument) GetResults() int
func (*ListDocument) JsonSerialize ¶
func (l *ListDocument) JsonSerialize() string
func (*ListDocument) MarshalJSON ¶
func (l *ListDocument) MarshalJSON() ([]byte, error)
json marshaling for struct ListDocument
func (*ListDocument) Serialize ¶
func (l *ListDocument) Serialize() map[string]interface{}
type OrderingInfo ¶
type OrderingInfo struct{}
func NewOrderingInfo ¶
func NewOrderingInfo() *OrderingInfo
func (*OrderingInfo) GetColumnOrdering ¶
func (oi *OrderingInfo) GetColumnOrdering(table *database.ReflectedTable, params map[string][]string) [][2]string
func (*OrderingInfo) GetDefaultColumnOrdering ¶
func (oi *OrderingInfo) GetDefaultColumnOrdering(table *database.ReflectedTable) [][2]string
type PaginationInfo ¶
type PaginationInfo struct{}
func (*PaginationInfo) GetPageLimit ¶
func (pi *PaginationInfo) GetPageLimit(params map[string][]string) int
func (*PaginationInfo) GetPageOffset ¶
func (pi *PaginationInfo) GetPageOffset(params map[string][]string) int
func (*PaginationInfo) GetResultSize ¶
func (pi *PaginationInfo) GetResultSize(params map[string][]string) int
type PathTree ¶
type PathTree struct {
// contains filtered or unexported fields
}
func NewPathTree ¶
func NewPathTree(tree *tree) *PathTree
type RecordService ¶
type RecordService struct {
// contains filtered or unexported fields
}
func NewRecordService ¶
func NewRecordService(db *database.GenericDB, reflection *database.ReflectionService) *RecordService
func (*RecordService) BeginTransaction ¶
func (rs *RecordService) BeginTransaction() (*sql.Tx, error)
func (*RecordService) CommitTransaction ¶
func (rs *RecordService) CommitTransaction(tx *sql.Tx) error
func (*RecordService) GetType ¶
func (rs *RecordService) GetType(table string) string
func (*RecordService) HasTable ¶
func (rs *RecordService) HasTable(table string) bool
func (*RecordService) List ¶
func (rs *RecordService) List(tableName string, params map[string][]string) *ListDocument
done
func (*RecordService) Ping ¶
func (rs *RecordService) Ping() int
func (*RecordService) RollBackTransaction ¶
func (rs *RecordService) RollBackTransaction(tx *sql.Tx) error
type RelationJoiner ¶
type RelationJoiner struct {
// contains filtered or unexported fields
}
func NewRelationJoiner ¶
func NewRelationJoiner(reflection *database.ReflectionService, columns *database.ColumnIncluder) *RelationJoiner
func (*RelationJoiner) AddJoins ¶
func (rj *RelationJoiner) AddJoins(table *database.ReflectedTable, records *[]map[string]interface{}, params map[string][]string, db *database.GenericDB)
func (*RelationJoiner) AddMandatoryColumns ¶
func (rj *RelationJoiner) AddMandatoryColumns(table *database.ReflectedTable, params *map[string][]string)
Click to show internal directories.
Click to hide internal directories.