Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jar ¶
Jar implements http.CookieJar by embedding a *cookiejar.Jar.
It accesses the private fields of *cookiejar.Jar via reflection to read/write the contents to/from a JSON file.
func (*Jar) MarshalJSON ¶
MarshalJSON implements json.Marshaler for Jar by marshaling the "entries" field of the embedded cookiejar.Jar. It obtains a lock on the embedded jar before reading the entries field.
func (*Jar) Save ¶
Save saves the contents of the embedded cookiejar.Jar to the file. It obtains a write lock on the file before writing the contents. A lock on the contents of the cookiejar.Jar is obtained when marshaling the JSON.
func (*Jar) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler for Jar by unmarshaling the bytes into the "entries" field of the embedded cookiejar.Jar. It obtains a lock on the embedded jar before writing to it. It will fail if the jar is not empty.