Skip to content

Instantly share code, notes, and snippets.

@hauxe
Created June 3, 2018 05:50
Show Gist options
  • Save hauxe/301bcda985b78c2ce83c489eff86a78a to your computer and use it in GitHub Desktop.
Save hauxe/301bcda985b78c2ce83c489eff86a78a to your computer and use it in GitHub Desktop.
crud structure
// Config defines crud properties
type Config struct {
DB *sqlx.DB
TableName string
Object Object
L bool
C bool
R bool
U bool
D bool
Validators map[string]Validator
fields []*field
createFields []*field
updateFields []*field
selectFields []*field
listFields []*field
pk *field
fieldValidators map[string]string
sqlCRUDCreate string
sqlCRUDRead string
sqlCRUDUpdate string
sqlCRUDDelete string
sqlCRUDList string
createdFields []*field
updatedFields []*field
selectedFields []*field
listedFields []*field
validatorMux sync.Mutex
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment