Documentation ¶
Overview ¶
Package schema provides schemas and validation functions for it.
Index ¶
Constants ¶
View Source
const (
// PDVDataSizeLimit is limit to PDVData's size.
PDVDataSizeLimit = 8 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PDV ¶
type PDV struct { Version PDVVersion `json:"version"` PDV []PDVObject `json:"pdv"` }
PDV is main Data object.
type PDVDataCookie ¶ added in v0.2.4
type PDVDataCookie struct { Name string `json:"name"` Value string `json:"value"` Domain string `json:"domain"` Path string `json:"path"` SameSite string `json:"same_site"` HostOnly bool `json:"host_only"` Secure bool `json:"secure"` ExpirationDate uint64 `json:"expiration_date,omitempty"` }
PDVDataCookie is PDVData implementation for Cookies(according to https://developer.chrome.com/extensions/cookies).
func (PDVDataCookie) MarshalJSON ¶ added in v0.2.4
func (d PDVDataCookie) MarshalJSON() ([]byte, error)
MarshalJSON ...
func (*PDVDataCookie) Validate ¶ added in v0.2.4
func (d *PDVDataCookie) Validate() bool
Validate ...
type PDVDataLoginCookie ¶ added in v0.2.4
type PDVDataLoginCookie struct { Name string `json:"name"` Value string `json:"value"` Domain string `json:"domain"` Path string `json:"path"` SameSite string `json:"same_site"` HostOnly bool `json:"host_only"` Secure bool `json:"secure"` ExpirationDate uint64 `json:"expiration_date,omitempty"` }
PDVDataLoginCookie is the same as PDVDataCookie but with different type.
func (PDVDataLoginCookie) MarshalJSON ¶ added in v0.2.4
func (d PDVDataLoginCookie) MarshalJSON() ([]byte, error)
MarshalJSON ...
func (*PDVDataLoginCookie) Validate ¶ added in v0.2.4
func (d *PDVDataLoginCookie) Validate() bool
Validate ...
type PDVObjectMetaV1 ¶
type PDVObjectMetaV1 struct { // Domain of website where object was taken Host string `json:"domain"` // Path of website's url where object was taken Path string `json:"path"` }
PDVObjectMetaV1 is PDVObjectV1 meta Data.
type PDVObjectV1 ¶
type PDVObjectV1 struct { PDVObjectMetaV1 Data []PDVData `json:"data"` }
PDVObjectV1 is PDVObject implementation with v1 version.
func (PDVObjectV1) GetData ¶ added in v0.2.4
func (o PDVObjectV1) GetData() []PDVData
GetData returns slice of PDVData.
func (*PDVObjectV1) UnmarshalJSON ¶
func (o *PDVObjectV1) UnmarshalJSON(b []byte) error
UnmarshalJSON ...
type PDVType ¶
type PDVType string
PDVType represents Data type. swagger:enum PDVType
func (*PDVType) UnmarshalText ¶ added in v0.2.4
UnmarshalText ...
type PDVVersion ¶
type PDVVersion string
PDVVersion represents version. swagger:enum PDVVersion
const ( // PDVV1 ... PDVV1 PDVVersion = "v1" )
Click to show internal directories.
Click to hide internal directories.