mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
Add codec tag to fields which are ignored in new codec package
github.com/ugorji/go/codec 1.1.4 ignores field with json:"-" tag
This commit is contained in:
committed by
Andrey Smirnov
parent
5c28ea3064
commit
5aefc741f2
+2
-2
@@ -15,7 +15,7 @@ import (
|
|||||||
// LocalRepo is a collection of packages created locally
|
// LocalRepo is a collection of packages created locally
|
||||||
type LocalRepo struct {
|
type LocalRepo struct {
|
||||||
// Permanent internal ID
|
// Permanent internal ID
|
||||||
UUID string `json:"-"`
|
UUID string `codec:"UUID" json:"-"`
|
||||||
// User-assigned name
|
// User-assigned name
|
||||||
Name string
|
Name string
|
||||||
// Comment
|
// Comment
|
||||||
@@ -25,7 +25,7 @@ type LocalRepo struct {
|
|||||||
// DefaultComponent
|
// DefaultComponent
|
||||||
DefaultComponent string `codec:",omitempty"`
|
DefaultComponent string `codec:",omitempty"`
|
||||||
// Uploaders configuration
|
// Uploaders configuration
|
||||||
Uploaders *Uploaders `code:",omitempty" json:"-"`
|
Uploaders *Uploaders `codec:"Uploaders,omitempty" json:"-"`
|
||||||
// "Snapshot" of current list of packages
|
// "Snapshot" of current list of packages
|
||||||
packageRefs *PackageRefList
|
packageRefs *PackageRefList
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -19,15 +19,15 @@ import (
|
|||||||
// Snapshot is immutable state of repository: list of packages
|
// Snapshot is immutable state of repository: list of packages
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
// Persisten internal ID
|
// Persisten internal ID
|
||||||
UUID string `json:"-"`
|
UUID string `codec:"UUID" json:"-"`
|
||||||
// Human-readable name
|
// Human-readable name
|
||||||
Name string
|
Name string
|
||||||
// Date of creation
|
// Date of creation
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
|
|
||||||
// Source: kind + ID
|
// Source: kind + ID
|
||||||
SourceKind string `json:"-"`
|
SourceKind string `codec:"SourceKind" json:"-"`
|
||||||
SourceIDs []string `json:"-"`
|
SourceIDs []string `codec:"SourceIDs" json:"-"`
|
||||||
// Description of how snapshot was created
|
// Description of how snapshot was created
|
||||||
Description string
|
Description string
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user