123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package cachestorage
- import (
- json "encoding/json"
- storage "github.com/chromedp/cdproto/storage"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
- )
- // suppress unused package warning
- var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
- )
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage(in *jlexer.Lexer, out *RequestEntriesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheDataEntries":
- if in.IsNull() {
- in.Skip()
- out.CacheDataEntries = nil
- } else {
- in.Delim('[')
- if out.CacheDataEntries == nil {
- if !in.IsDelim(']') {
- out.CacheDataEntries = make([]*DataEntry, 0, 8)
- } else {
- out.CacheDataEntries = []*DataEntry{}
- }
- } else {
- out.CacheDataEntries = (out.CacheDataEntries)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *DataEntry
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(DataEntry)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.CacheDataEntries = append(out.CacheDataEntries, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "returnCount":
- out.ReturnCount = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage(out *jwriter.Writer, in RequestEntriesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.CacheDataEntries) != 0 {
- const prefix string = ",\"cacheDataEntries\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.CacheDataEntries {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.ReturnCount != 0 {
- const prefix string = ",\"returnCount\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.ReturnCount))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RequestEntriesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RequestEntriesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RequestEntriesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RequestEntriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1(in *jlexer.Lexer, out *RequestEntriesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "skipCount":
- out.SkipCount = int64(in.Int64())
- case "pageSize":
- out.PageSize = int64(in.Int64())
- case "pathFilter":
- out.PathFilter = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage1(out *jwriter.Writer, in RequestEntriesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- if in.SkipCount != 0 {
- const prefix string = ",\"skipCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.SkipCount))
- }
- if in.PageSize != 0 {
- const prefix string = ",\"pageSize\":"
- out.RawString(prefix)
- out.Int64(int64(in.PageSize))
- }
- if in.PathFilter != "" {
- const prefix string = ",\"pathFilter\":"
- out.RawString(prefix)
- out.String(string(in.PathFilter))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RequestEntriesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RequestEntriesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage1(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RequestEntriesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RequestEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage2(in *jlexer.Lexer, out *RequestCachedResponseReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(CachedResponse)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage2(out *jwriter.Writer, in RequestCachedResponseReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Response != nil {
- const prefix string = ",\"response\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Response).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RequestCachedResponseReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RequestCachedResponseReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage2(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RequestCachedResponseReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage2(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RequestCachedResponseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage2(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage3(in *jlexer.Lexer, out *RequestCachedResponseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "requestURL":
- out.RequestURL = string(in.String())
- case "requestHeaders":
- if in.IsNull() {
- in.Skip()
- out.RequestHeaders = nil
- } else {
- in.Delim('[')
- if out.RequestHeaders == nil {
- if !in.IsDelim(']') {
- out.RequestHeaders = make([]*Header, 0, 8)
- } else {
- out.RequestHeaders = []*Header{}
- }
- } else {
- out.RequestHeaders = (out.RequestHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Header
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Header)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.RequestHeaders = append(out.RequestHeaders, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3(out *jwriter.Writer, in RequestCachedResponseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- {
- const prefix string = ",\"requestURL\":"
- out.RawString(prefix)
- out.String(string(in.RequestURL))
- }
- {
- const prefix string = ",\"requestHeaders\":"
- out.RawString(prefix)
- if in.RequestHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.RequestHeaders {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RequestCachedResponseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RequestCachedResponseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RequestCachedResponseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage3(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RequestCachedResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage3(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage4(in *jlexer.Lexer, out *RequestCacheNamesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "caches":
- if in.IsNull() {
- in.Skip()
- out.Caches = nil
- } else {
- in.Delim('[')
- if out.Caches == nil {
- if !in.IsDelim(']') {
- out.Caches = make([]*Cache, 0, 8)
- } else {
- out.Caches = []*Cache{}
- }
- } else {
- out.Caches = (out.Caches)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *Cache
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(Cache)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Caches = append(out.Caches, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage4(out *jwriter.Writer, in RequestCacheNamesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Caches) != 0 {
- const prefix string = ",\"caches\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Caches {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RequestCacheNamesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RequestCacheNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage4(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RequestCacheNamesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage4(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RequestCacheNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage4(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(in *jlexer.Lexer, out *RequestCacheNamesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "storageKey":
- out.StorageKey = string(in.String())
- case "storageBucket":
- if in.IsNull() {
- in.Skip()
- out.StorageBucket = nil
- } else {
- if out.StorageBucket == nil {
- out.StorageBucket = new(storage.Bucket)
- }
- (*out.StorageBucket).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(out *jwriter.Writer, in RequestCacheNamesParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SecurityOrigin != "" {
- const prefix string = ",\"securityOrigin\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- if in.StorageKey != "" {
- const prefix string = ",\"storageKey\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.StorageKey))
- }
- if in.StorageBucket != nil {
- const prefix string = ",\"storageBucket\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.StorageBucket).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RequestCacheNamesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RequestCacheNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RequestCacheNamesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RequestCacheNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage6(in *jlexer.Lexer, out *Header) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage6(out *jwriter.Writer, in Header) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v Header) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v Header) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage6(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *Header) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage6(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *Header) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage6(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage7(in *jlexer.Lexer, out *DeleteEntryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "request":
- out.Request = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage7(out *jwriter.Writer, in DeleteEntryParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- out.String(string(in.Request))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DeleteEntryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DeleteEntryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage7(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DeleteEntryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage7(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DeleteEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage7(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage8(in *jlexer.Lexer, out *DeleteCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage8(out *jwriter.Writer, in DeleteCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DeleteCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DeleteCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage8(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DeleteCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage8(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DeleteCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage8(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage9(in *jlexer.Lexer, out *DataEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestURL":
- out.RequestURL = string(in.String())
- case "requestMethod":
- out.RequestMethod = string(in.String())
- case "requestHeaders":
- if in.IsNull() {
- in.Skip()
- out.RequestHeaders = nil
- } else {
- in.Delim('[')
- if out.RequestHeaders == nil {
- if !in.IsDelim(']') {
- out.RequestHeaders = make([]*Header, 0, 8)
- } else {
- out.RequestHeaders = []*Header{}
- }
- } else {
- out.RequestHeaders = (out.RequestHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *Header
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(Header)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.RequestHeaders = append(out.RequestHeaders, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "responseTime":
- out.ResponseTime = float64(in.Float64())
- case "responseStatus":
- out.ResponseStatus = int64(in.Int64())
- case "responseStatusText":
- out.ResponseStatusText = string(in.String())
- case "responseType":
- (out.ResponseType).UnmarshalEasyJSON(in)
- case "responseHeaders":
- if in.IsNull() {
- in.Skip()
- out.ResponseHeaders = nil
- } else {
- in.Delim('[')
- if out.ResponseHeaders == nil {
- if !in.IsDelim(']') {
- out.ResponseHeaders = make([]*Header, 0, 8)
- } else {
- out.ResponseHeaders = []*Header{}
- }
- } else {
- out.ResponseHeaders = (out.ResponseHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v11 *Header
- if in.IsNull() {
- in.Skip()
- v11 = nil
- } else {
- if v11 == nil {
- v11 = new(Header)
- }
- (*v11).UnmarshalEasyJSON(in)
- }
- out.ResponseHeaders = append(out.ResponseHeaders, v11)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage9(out *jwriter.Writer, in DataEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestURL))
- }
- {
- const prefix string = ",\"requestMethod\":"
- out.RawString(prefix)
- out.String(string(in.RequestMethod))
- }
- {
- const prefix string = ",\"requestHeaders\":"
- out.RawString(prefix)
- if in.RequestHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v12, v13 := range in.RequestHeaders {
- if v12 > 0 {
- out.RawByte(',')
- }
- if v13 == nil {
- out.RawString("null")
- } else {
- (*v13).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"responseTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.ResponseTime))
- }
- {
- const prefix string = ",\"responseStatus\":"
- out.RawString(prefix)
- out.Int64(int64(in.ResponseStatus))
- }
- {
- const prefix string = ",\"responseStatusText\":"
- out.RawString(prefix)
- out.String(string(in.ResponseStatusText))
- }
- {
- const prefix string = ",\"responseType\":"
- out.RawString(prefix)
- (in.ResponseType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"responseHeaders\":"
- out.RawString(prefix)
- if in.ResponseHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.ResponseHeaders {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DataEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage9(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DataEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage9(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage9(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage10(in *jlexer.Lexer, out *CachedResponse) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "body":
- out.Body = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage10(out *jwriter.Writer, in CachedResponse) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"body\":"
- out.RawString(prefix[1:])
- out.String(string(in.Body))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v CachedResponse) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v CachedResponse) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage10(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *CachedResponse) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage10(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *CachedResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage10(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(in *jlexer.Lexer, out *Cache) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "storageKey":
- out.StorageKey = string(in.String())
- case "storageBucket":
- if in.IsNull() {
- in.Skip()
- out.StorageBucket = nil
- } else {
- if out.StorageBucket == nil {
- out.StorageBucket = new(storage.Bucket)
- }
- (*out.StorageBucket).UnmarshalEasyJSON(in)
- }
- case "cacheName":
- out.CacheName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(out *jwriter.Writer, in Cache) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix)
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"storageKey\":"
- out.RawString(prefix)
- out.String(string(in.StorageKey))
- }
- if in.StorageBucket != nil {
- const prefix string = ",\"storageBucket\":"
- out.RawString(prefix)
- (*in.StorageBucket).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"cacheName\":"
- out.RawString(prefix)
- out.String(string(in.CacheName))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v Cache) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v Cache) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *Cache) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(l, v)
- }
|