Add base resource decoders
* yaml, * csv.
This commit is contained in:
@@ -1,27 +1,28 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/pkg/filter"
|
||||
"github.com/cortezaproject/corteza-server/pkg/rbac"
|
||||
"github.com/jmoiron/sqlx/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
type (
|
||||
Module struct {
|
||||
ID uint64 `json:"moduleID,string"`
|
||||
ID uint64 `json:"moduleID,string" yaml:"-"`
|
||||
Handle string `json:"handle"`
|
||||
Name string `json:"name"`
|
||||
Meta types.JSONText `json:"meta"`
|
||||
Fields ModuleFieldSet `json:"fields"`
|
||||
Meta types.JSONText `json:"meta" yaml:",omitempty"`
|
||||
Fields ModuleFieldSet `json:"fields" yaml:"-"`
|
||||
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
|
||||
NamespaceID uint64 `json:"namespaceID,string"`
|
||||
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty" yaml:",omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty" yaml:",omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty" yaml:",omitempty"`
|
||||
}
|
||||
|
||||
ModuleFilter struct {
|
||||
|
||||
@@ -3,10 +3,11 @@ package types
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/cortezaproject/corteza-server/pkg/filter"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/pkg/filter"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/pkg/rbac"
|
||||
)
|
||||
|
||||
@@ -35,7 +36,7 @@ type (
|
||||
ID uint64 `json:"recordID,string"`
|
||||
ModuleID uint64 `json:"moduleID,string"`
|
||||
|
||||
Values RecordValueSet `json:"values,omitempty"`
|
||||
Values RecordValueSet `json:"values,omitempty" yaml:"-"`
|
||||
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user