diff --git a/.gitignore b/.gitignore index 507fa6387..195f502cc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules package-lock.json /jsaddon/build +.vscode \ No newline at end of file diff --git a/Makefile b/Makefile index 25e9ec6c8..2292d00e6 100644 --- a/Makefile +++ b/Makefile @@ -54,10 +54,12 @@ build-android: mkdir -p dist/android/ && mv mobile.aar mobile/dist/android/ setup-protoc: - rm -rf $(GOPATH)/src/github.com/gogo/protobuf + rm -rf $(GOPATH)/src/github.com/gogo mkdir -p $(GOPATH)/src/github.com/gogo cd $(GOPATH)/src/github.com/gogo; git clone https://github.com/anytypeio/protobuf cd $(GOPATH)/src/github.com/gogo/protobuf; go install github.com/gogo/protobuf/protoc-gen-gogofaster + cd $(GOPATH)/src/github.com/gogo/protobuf; go install github.com/gogo/protobuf/protoc-gen-gogofast + cd $(GOPATH); go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin # protos: # libprotoc 3.9.1 @@ -66,5 +68,6 @@ setup-protoc: protos: $(eval P_STRUCT := Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct) - cd pb/protos; protoc --gogofaster_out=$(P_STRUCT):.. *.proto - cd pb/protos/service; PACKAGE_PATH=github.com/anytypeio/go-anytype-middleware/pb protoc -I=.. -I=. --gogofast_out=plugins=gomobile:../../../lib service.proto \ No newline at end of file + cd pb/protos; GOGO_NO_UNDERSCORE=1 protoc --gogofaster_out=$(P_STRUCT):.. *.proto + cd pb/protos/service; GOGO_NO_UNDERSCORE=1 PACKAGE_PATH=github.com/anytypeio/go-anytype-middleware/pb protoc -I=.. -I=. --gogofaster_out=plugins=gomobile:../../../lib service.proto + cd pb/protos; GOGO_NO_UNDERSCORE=1 protoc --doc_out=../../docs --doc_opt=markdown,proto.md service/*.proto *.proto diff --git a/core/account.go b/core/account.go index e787c86a2..7234bded1 100644 --- a/core/account.go +++ b/core/account.go @@ -11,11 +11,11 @@ import ( "github.com/anytypeio/go-anytype-middleware/pb" ) -var avatarSizes = []pb.ImageSize{pb.ImageSize_SMALL, pb.ImageSize_LARGE} +var avatarSizes = []pb.ModelImageSize{pb.ModelImage_SMALL, pb.ModelImage_LARGE} -func (mw *Middleware) AccountCreate(req *pb.AccountCreateRequest) *pb.AccountCreateResponse { - response := func(account *pb.Account, code pb.AccountCreateResponse_Error_Code, err error) *pb.AccountCreateResponse { - m := &pb.AccountCreateResponse{Account: account, Error: &pb.AccountCreateResponse_Error{Code: code}} +func (mw *Middleware) AccountCreate(req *pb.RpcAccountCreateRequest) *pb.RpcAccountCreateResponse { + response := func(account *pb.ModelAccount, code pb.RpcAccountCreateResponseErrorCode, err error) *pb.RpcAccountCreateResponse { + m := &pb.RpcAccountCreateResponse{Account: account, Error: &pb.RpcAccountCreateResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -30,61 +30,61 @@ func (mw *Middleware) AccountCreate(req *pb.AccountCreateRequest) *pb.AccountCre account, err := core.WalletAccountAt(mw.mnemonic, len(mw.localAccounts), "") if err != nil { - return response(nil, pb.AccountCreateResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcAccountCreateResponseError_UNKNOWN_ERROR, err) } err = core.WalletInitRepo(mw.rootPath, account.Seed()) if err != nil { - return response(nil, pb.AccountCreateResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcAccountCreateResponseError_UNKNOWN_ERROR, err) } anytype, err := core.New(mw.rootPath, account.Address()) if err != nil { - return response(nil, pb.AccountCreateResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcAccountCreateResponseError_UNKNOWN_ERROR, err) } mw.Anytype = anytype - newAcc := &pb.Account{Id: account.Address()} + newAcc := &pb.ModelAccount{Id: account.Address()} err = mw.Run() if err != nil { - return response(newAcc, pb.AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE, err) + return response(newAcc, pb.RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE, err) } err = mw.AccountSetName(req.Name) if err != nil { - return response(newAcc, pb.AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME, err) + return response(newAcc, pb.RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME, err) } newAcc.Name, err = mw.Textile.Name() if err != nil { - return response(newAcc, pb.AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME, err) + return response(newAcc, pb.RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME, err) } if req.GetAvatarLocalPath() != "" { _, err := mw.AccountSetAvatar(req.GetAvatarLocalPath()) if err != nil { - return response(newAcc, pb.AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR, err) + return response(newAcc, pb.RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR, err) } hash, err := mw.Textile.Avatar() if err != nil { - return response(newAcc, pb.AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR, err) + return response(newAcc, pb.RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR, err) } - newAcc.Avatar = &pb.Avatar{Avatar: &pb.Avatar_Image{Image: &pb.Image{hash, avatarSizes}}} + newAcc.Avatar = &pb.ModelAccountAvatar{Avatar: &pb.ModelAccountAvatarAvatarOfImage{Image: &pb.ModelImage{hash, avatarSizes}}} } else if req.GetAvatarColor() != "" { err := mw.AccountSetAvatarColor(req.GetAvatarColor()) if err != nil { - return response(newAcc, pb.AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR, err) + return response(newAcc, pb.RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR, err) } } mw.localAccounts = append(mw.localAccounts, newAcc) - return response(newAcc, pb.AccountCreateResponse_Error_NULL, nil) + return response(newAcc, pb.RpcAccountCreateResponseError_NULL, nil) } -func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRecoverResponse { - response := func(code pb.AccountRecoverResponse_Error_Code, err error) *pb.AccountRecoverResponse { - m := &pb.AccountRecoverResponse{Error: &pb.AccountRecoverResponse_Error{Code: code}} +func (mw *Middleware) AccountRecover(_ *pb.RpcAccountRecoverRequest) *pb.RpcAccountRecoverResponse { + response := func(code pb.RpcAccountRecoverResponseErrorCode, err error) *pb.RpcAccountRecoverResponse { + m := &pb.RpcAccountRecoverResponse{Error: &pb.RpcAccountRecoverResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -92,15 +92,15 @@ func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRec return m } - sendAccountAddEvent := func(index int, account *pb.Account) { - m := &pb.Event{Message: &pb.Event_AccountShow{AccountShow: &pb.AccountShow{Index: int64(index), Account: account}}} + sendAccountAddEvent := func(index int, account *pb.ModelAccount) { + m := &pb.Event{Message: &pb.EventMessageOfAccountShow{AccountShow: &pb.EventAccountShow{Index: int64(index), Account: account}}} if mw.SendEvent != nil { mw.SendEvent(m) } } if mw.mnemonic == "" { - return response(pb.AccountRecoverResponse_Error_NEED_TO_RECOVER_WALLET_FIRST, nil) + return response(pb.RpcAccountRecoverResponseError_NEED_TO_RECOVER_WALLET_FIRST, nil) } shouldCancel := false @@ -129,32 +129,32 @@ func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRec sendAccountAddEvent(index, mw.localAccounts[index]) index++ if shouldCancel { - return response(pb.AccountRecoverResponse_Error_NULL, nil) + return response(pb.RpcAccountRecoverResponseError_NULL, nil) } } // now let's start the first account to perform cafe contacts search queries account, err := core.WalletAccountAt(mw.mnemonic, 0, "") if err != nil { - return response(pb.AccountRecoverResponse_Error_BAD_INPUT, err) + return response(pb.RpcAccountRecoverResponseError_WALLET_RECOVER_NOT_PERFORMED, err) } err = core.WalletInitRepo(mw.rootPath, account.Seed()) if err != nil && err != core.ErrRepoExists { - return response(pb.AccountRecoverResponse_Error_FAILED_TO_CREATE_LOCAL_REPO, err) + return response(pb.RpcAccountRecoverResponseError_FAILED_TO_CREATE_LOCAL_REPO, err) } anytype, err := core.New(mw.rootPath, account.Address()) if err != nil { - return response(pb.AccountRecoverResponse_Error_UNKNOWN_ERROR, err) + return response(pb.RpcAccountRecoverResponseError_UNKNOWN_ERROR, err) } err = anytype.Run() if err != nil { if err == core.ErrRepoCorrupted { - return response(pb.AccountRecoverResponse_Error_LOCAL_REPO_EXISTS_BUT_CORRUPTED, err) + return response(pb.RpcAccountRecoverResponseError_LOCAL_REPO_EXISTS_BUT_CORRUPTED, err) } - return response(pb.AccountRecoverResponse_Error_FAILED_TO_RUN_NODE, err) + return response(pb.RpcAccountRecoverResponseError_FAILED_TO_RUN_NODE, err) } defer func() { @@ -165,7 +165,7 @@ func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRec }() if shouldCancel { - return response(pb.AccountRecoverResponse_Error_NULL, nil) + return response(pb.RpcAccountRecoverResponseError_NULL, nil) } for { @@ -190,7 +190,7 @@ func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRec // todo: add goroutine to query multiple accounts at once account, err := core.WalletAccountAt(mw.mnemonic, index, "") if err != nil { - return response(pb.AccountRecoverResponse_Error_BAD_INPUT, err) + return response(pb.RpcAccountRecoverResponseError_WALLET_RECOVER_NOT_PERFORMED, err) } var ctx context.Context @@ -199,20 +199,20 @@ func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRec if err != nil || contact == nil { if index == 0 { - return response(pb.AccountRecoverResponse_Error_NO_ACCOUNTS_FOUND, err) + return response(pb.RpcAccountRecoverResponseError_NO_ACCOUNTS_FOUND, err) } - return response(pb.AccountRecoverResponse_Error_NULL, nil) + return response(pb.RpcAccountRecoverResponseError_NULL, nil) } if contact.Name == "" { if index == 0 { - return response(pb.AccountRecoverResponse_Error_NO_ACCOUNTS_FOUND, err) + return response(pb.RpcAccountRecoverResponseError_NO_ACCOUNTS_FOUND, err) } - return response(pb.AccountRecoverResponse_Error_NULL, nil) + return response(pb.RpcAccountRecoverResponseError_NULL, nil) } - newAcc := &pb.Account{Id: account.Address(), Name: contact.Name} + newAcc := &pb.ModelAccount{Id: account.Address(), Name: contact.Name} if contact.Avatar != "" { newAcc.Avatar = getAvatarFromString(contact.Avatar) @@ -222,15 +222,15 @@ func (mw *Middleware) AccountRecover(_ *pb.AccountRecoverRequest) *pb.AccountRec mw.localAccounts = append(mw.localAccounts, newAcc) if shouldCancel { - return response(pb.AccountRecoverResponse_Error_NULL, nil) + return response(pb.RpcAccountRecoverResponseError_NULL, nil) } index++ } } -func (mw *Middleware) AccountSelect(req *pb.AccountSelectRequest) *pb.AccountSelectResponse { - response := func(account *pb.Account, code pb.AccountSelectResponse_Error_Code, err error) *pb.AccountSelectResponse { - m := &pb.AccountSelectResponse{Account: account, Error: &pb.AccountSelectResponse_Error{Code: code}} +func (mw *Middleware) AccountSelect(req *pb.RpcAccountSelectRequest) *pb.RpcAccountSelectResponse { + response := func(account *pb.ModelAccount, code pb.RpcAccountSelectResponseErrorCode, err error) *pb.RpcAccountSelectResponse { + m := &pb.RpcAccountSelectResponse{Account: account, Error: &pb.RpcAccountSelectResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -249,23 +249,23 @@ func (mw *Middleware) AccountSelect(req *pb.AccountSelectRequest) *pb.AccountSel if _, err := os.Stat(filepath.Join(mw.rootPath, req.Id)); os.IsNotExist(err) { if mw.mnemonic == "" { - return response(nil, pb.AccountSelectResponse_Error_LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET, err) + return response(nil, pb.RpcAccountSelectResponseError_LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET, err) } account, err := core.WalletAccountAt(mw.mnemonic, len(mw.localAccounts), "") if err != nil { - return response(nil, pb.AccountSelectResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcAccountSelectResponseError_UNKNOWN_ERROR, err) } err = core.WalletInitRepo(mw.rootPath, account.Seed()) if err != nil { - return response(nil, pb.AccountSelectResponse_Error_FAILED_TO_CREATE_LOCAL_REPO, err) + return response(nil, pb.RpcAccountSelectResponseError_FAILED_TO_CREATE_LOCAL_REPO, err) } } anytype, err := core.New(mw.rootPath, req.Id) if err != nil { - return response(nil, pb.AccountSelectResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcAccountSelectResponseError_UNKNOWN_ERROR, err) } mw.Anytype = anytype @@ -273,22 +273,22 @@ func (mw *Middleware) AccountSelect(req *pb.AccountSelectRequest) *pb.AccountSel err = mw.Run() if err != nil { if err == core.ErrRepoCorrupted { - return response(nil, pb.AccountSelectResponse_Error_LOCAL_REPO_EXISTS_BUT_CORRUPTED, err) + return response(nil, pb.RpcAccountSelectResponseError_LOCAL_REPO_EXISTS_BUT_CORRUPTED, err) } - return response(nil, pb.AccountSelectResponse_Error_FAILED_TO_RUN_NODE, err) + return response(nil, pb.RpcAccountSelectResponseError_FAILED_TO_RUN_NODE, err) } - acc := &pb.Account{Id: req.Id} + acc := &pb.ModelAccount{Id: req.Id} acc.Name, err = mw.Anytype.Textile.Name() if err != nil { - return response(acc, pb.AccountSelectResponse_Error_FAILED_TO_FIND_ACCOUNT_INFO, err) + return response(acc, pb.RpcAccountSelectResponseError_FAILED_TO_FIND_ACCOUNT_INFO, err) } avatarHashOrColor, err := mw.Anytype.Textile.Avatar() if err != nil { - return response(acc, pb.AccountSelectResponse_Error_FAILED_TO_FIND_ACCOUNT_INFO, err) + return response(acc, pb.RpcAccountSelectResponseError_FAILED_TO_FIND_ACCOUNT_INFO, err) } if acc.Name == "" && avatarHashOrColor == "" { @@ -304,7 +304,7 @@ func (mw *Middleware) AccountSelect(req *pb.AccountSelectRequest) *pb.AccountSel contact, err := anytype.AccountRequestStoredContact(context.Background(), req.Id) if err != nil { - return response(acc, pb.AccountSelectResponse_Error_FAILED_TO_FIND_ACCOUNT_INFO, err) + return response(acc, pb.RpcAccountSelectResponseError_FAILED_TO_FIND_ACCOUNT_INFO, err) } acc.Name = contact.Name avatarHashOrColor = contact.Avatar @@ -314,13 +314,13 @@ func (mw *Middleware) AccountSelect(req *pb.AccountSelectRequest) *pb.AccountSel acc.Avatar = getAvatarFromString(avatarHashOrColor) } - return response(acc, pb.AccountSelectResponse_Error_NULL, nil) + return response(acc, pb.RpcAccountSelectResponseError_NULL, nil) } -func getAvatarFromString(avatarHashOrColor string) *pb.Avatar { +func getAvatarFromString(avatarHashOrColor string) *pb.ModelAccountAvatar { if strings.HasPrefix(avatarHashOrColor, "#") { - return &pb.Avatar{&pb.Avatar_Color{avatarHashOrColor}} + return &pb.ModelAccountAvatar{&pb.ModelAccountAvatarAvatarOfColor{avatarHashOrColor}} } else { - return &pb.Avatar{&pb.Avatar_Image{&pb.Image{avatarHashOrColor, avatarSizes}}} + return &pb.ModelAccountAvatar{&pb.ModelAccountAvatarAvatarOfImage{&pb.ModelImage{avatarHashOrColor, avatarSizes}}} } } diff --git a/core/account_test.go b/core/account_test.go index 5a31f01e6..14e59ccbb 100644 --- a/core/account_test.go +++ b/core/account_test.go @@ -13,8 +13,8 @@ import ( func createWallet(t *testing.T) *Middleware { mw := &Middleware{} rootPath := os.TempDir() - resp := mw.WalletCreate(&pb.WalletCreateRequest{RootPath: rootPath}) - require.Equal(t, pb.WalletCreateResponse_Error_NULL, resp.Error.Code, resp.Error.Code, "WalletCreate error should be 0") + resp := mw.WalletCreate(&pb.RpcWalletCreateRequest{RootPath: rootPath}) + require.Equal(t, pb.RpcWalletCreateResponseError_NULL, resp.Error.Code, resp.Error.Code, "WalletCreate error should be 0") require.Equal(t, 12, len(strings.Split(resp.Mnemonic, " ")), "WalletCreate should return 12 words") return mw } @@ -22,37 +22,37 @@ func createWallet(t *testing.T) *Middleware { func recoverWallet(t *testing.T, mnemonic string) *Middleware { mw := &Middleware{} rootPath := os.TempDir() - resp := mw.WalletRecover(&pb.WalletRecoverRequest{RootPath: rootPath, Mnemonic: mnemonic}) - require.Equal(t, pb.WalletRecoverResponse_Error_NULL, resp.Error.Code, "WalletRecover error should be 0") + resp := mw.WalletRecover(&pb.RpcWalletRecoverRequest{RootPath: rootPath, Mnemonic: mnemonic}) + require.Equal(t, pb.RpcWalletRecoverResponseError_NULL, resp.Error.Code, "WalletRecover error should be 0") return mw } -func Test_AccountCreate(t *testing.T) { +func TestAccountCreate(t *testing.T) { mw := createWallet(t) - accountCreateResp := mw.AccountCreate(&pb.AccountCreateRequest{Name: "name_test", Avatar: &pb.AccountCreateRequest_AvatarLocalPath{"testdata/pic1.jpg"}}) + accountCreateResp := mw.AccountCreate(&pb.RpcAccountCreateRequest{Name: "name_test", Avatar: &pb.RpcAccountCreateRequestAvatarOfAvatarLocalPath{"testdata/pic1.jpg"}}) require.Equal(t, "name_test", accountCreateResp.Account.Name, "AccountCreateResponse has account with wrong name '%s'", accountCreateResp.Account.Name) - imageGetBlobResp := mw.ImageGetBlob(&pb.ImageGetBlobRequest{Id: accountCreateResp.Account.Avatar.GetImage().Id, Size_: pb.ImageSize_SMALL}) - require.Equal(t, pb.ImageGetBlobResponse_Error_NULL, imageGetBlobResp.Error.Code, "ImageGetBlobResponse contains error: %+v", imageGetBlobResp.Error) + imageGetBlobResp := mw.ImageGetBlob(&pb.RpcImageGetBlobRequest{Id: accountCreateResp.Account.Avatar.GetImage().Id, Size_: pb.ModelImage_SMALL}) + require.Equal(t, pb.RpcImageGetBlobResponseError_NULL, imageGetBlobResp.Error.Code, "ImageGetBlobResponse contains error: %+v", imageGetBlobResp.Error) require.True(t, len(imageGetBlobResp.Blob) > 0, "ava size should be greater than 0") err := mw.Stop() require.NoError(t, err, "failed to stop mw") } -func Test_AccountRecover_LocalWithoutRestart(t *testing.T) { +func TestAccountRecoverLocalWithoutRestart(t *testing.T) { mw := createWallet(t) - accountCreateResp := mw.AccountCreate(&pb.AccountCreateRequest{Name: "name_to_test_recover", Avatar: &pb.AccountCreateRequest_AvatarLocalPath{"testdata/pic1.jpg"}}) + accountCreateResp := mw.AccountCreate(&pb.RpcAccountCreateRequest{Name: "name_to_test_recover", Avatar: &pb.RpcAccountCreateRequestAvatarOfAvatarLocalPath{"testdata/pic1.jpg"}}) require.Equal(t, "name_to_test_recover", accountCreateResp.Account.Name, "AccountCreateResponse has account with wrong name '%s'", accountCreateResp.Account.Name) err := mw.Stop() require.NoError(t, err, "failed to stop node") - var accountCh = make(chan *pb.Account, 10) + var accountCh = make(chan *pb.ModelAccount, 10) mw.SendEvent = func(event *pb.Event) { - if aa, ok := event.Message.(*pb.Event_AccountShow); ok { + if aa, ok := event.Message.(*pb.EventMessageOfAccountShow); ok { if aa.AccountShow.Index != 0 { return } @@ -61,13 +61,13 @@ func Test_AccountRecover_LocalWithoutRestart(t *testing.T) { } } - walletRecoverResp := mw.WalletRecover(&pb.WalletRecoverRequest{RootPath: mw.rootPath, Mnemonic: mw.mnemonic}) - require.Equal(t, pb.WalletRecoverResponse_Error_NULL, walletRecoverResp.Error.Code, "WalletRecoverResponse contains error: %+v", walletRecoverResp.Error) + walletRecoverResp := mw.WalletRecover(&pb.RpcWalletRecoverRequest{RootPath: mw.rootPath, Mnemonic: mw.mnemonic}) + require.Equal(t, pb.RpcWalletRecoverResponseError_NULL, walletRecoverResp.Error.Code, "WalletRecoverResponse contains error: %+v", walletRecoverResp.Error) - accountRecoverResp := mw.AccountRecover(&pb.AccountRecoverRequest{}) - require.Equal(t, pb.AccountRecoverResponse_Error_NULL, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) + accountRecoverResp := mw.AccountRecover(&pb.RpcAccountRecoverRequest{}) + require.Equal(t, pb.RpcAccountRecoverResponseError_NULL, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) - var account *pb.Account + var account *pb.ModelAccount select { case account = <-accountCh: break @@ -80,10 +80,10 @@ func Test_AccountRecover_LocalWithoutRestart(t *testing.T) { require.NoError(t, err, "failed to stop mw") } -func Test_AccountRecover_LocalAfterRestart(t *testing.T) { +func TestAccountRecoverLocalAfterRestart(t *testing.T) { mw := createWallet(t) - accountCreateResp := mw.AccountCreate(&pb.AccountCreateRequest{Name: "name_to_test_recover", Avatar: &pb.AccountCreateRequest_AvatarLocalPath{"testdata/pic1.jpg"}}) + accountCreateResp := mw.AccountCreate(&pb.RpcAccountCreateRequest{Name: "name_to_test_recover", Avatar: &pb.RpcAccountCreateRequestAvatarOfAvatarLocalPath{"testdata/pic1.jpg"}}) require.Equal(t, "name_to_test_recover", accountCreateResp.Account.Name, "AccountCreateResponse has account with wrong name '%s'", accountCreateResp.Account.Name) err := mw.Stop() @@ -94,9 +94,9 @@ func Test_AccountRecover_LocalAfterRestart(t *testing.T) { // reset singleton to emulate restart mw = &Middleware{} - var accountCh = make(chan *pb.Account, 10) + var accountCh = make(chan *pb.ModelAccount, 10) mw.SendEvent = func(event *pb.Event) { - if aa, ok := event.Message.(*pb.Event_AccountShow); ok { + if aa, ok := event.Message.(*pb.EventMessageOfAccountShow); ok { if aa.AccountShow.Index != 0 { return } @@ -105,13 +105,13 @@ func Test_AccountRecover_LocalAfterRestart(t *testing.T) { } } - walletRecoverResp := mw.WalletRecover(&pb.WalletRecoverRequest{RootPath: rootPath, Mnemonic: mnemonic}) - require.Equal(t, pb.WalletRecoverResponse_Error_NULL, walletRecoverResp.Error.Code, "WalletRecoverResponse contains error: %+v", walletRecoverResp.Error) + walletRecoverResp := mw.WalletRecover(&pb.RpcWalletRecoverRequest{RootPath: rootPath, Mnemonic: mnemonic}) + require.Equal(t, pb.RpcWalletRecoverResponseError_NULL, walletRecoverResp.Error.Code, "WalletRecoverResponse contains error: %+v", walletRecoverResp.Error) - accountRecoverResp := mw.AccountRecover(&pb.AccountRecoverRequest{}) - require.Equal(t, pb.AccountRecoverResponse_Error_NULL, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) + accountRecoverResp := mw.AccountRecover(&pb.RpcAccountRecoverRequest{}) + require.Equal(t, pb.RpcAccountRecoverResponseError_NULL, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) - var account *pb.Account + var account *pb.ModelAccount select { case account = <-accountCh: break @@ -124,19 +124,19 @@ func Test_AccountRecover_LocalAfterRestart(t *testing.T) { err = mw.Stop() } -func Test_AccountRecover_RemoteNotExisting(t *testing.T) { +func TestAccountRecoverRemoteNotExisting(t *testing.T) { mw := recoverWallet(t, "limit oxygen february destroy subway toddler umbrella nose praise shield afford eager") require.Equal(t, len(mw.localAccounts), 0, "localAccounts should be empty, instead got length = %d", len(mw.localAccounts)) - var account *pb.Account + var account *pb.ModelAccount mw.SendEvent = func(event *pb.Event) { - if aa, ok := event.Message.(*pb.Event_AccountShow); ok { + if aa, ok := event.Message.(*pb.EventMessageOfAccountShow); ok { account = aa.AccountShow.Account } } - accountRecoverResp := mw.AccountRecover(&pb.AccountRecoverRequest{}) - require.Equal(t, pb.AccountRecoverResponse_Error_NO_ACCOUNTS_FOUND, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) + accountRecoverResp := mw.AccountRecover(&pb.RpcAccountRecoverRequest{}) + require.Equal(t, pb.RpcAccountRecoverResponseError_NO_ACCOUNTS_FOUND, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) require.Nil(t, account, "account shouldn't be recovered") @@ -144,13 +144,13 @@ func Test_AccountRecover_RemoteNotExisting(t *testing.T) { require.NoError(t, err, "failed to stop mw") } -func Test_RecoverRemoteExisting(t *testing.T) { +func TestRecoverRemoteExisting(t *testing.T) { mw := recoverWallet(t, "input blame switch simple fatigue fragile grab goose unusual identify abuse use") require.Equal(t, len(mw.localAccounts), 0, "localAccounts should be empty, instead got length = %d", len(mw.localAccounts)) - var accountCh = make(chan *pb.Account, 10) + var accountCh = make(chan *pb.ModelAccount, 10) mw.SendEvent = func(event *pb.Event) { - if aa, ok := event.Message.(*pb.Event_AccountShow); ok { + if aa, ok := event.Message.(*pb.EventMessageOfAccountShow); ok { if aa.AccountShow.Index != 0 { return } @@ -159,10 +159,10 @@ func Test_RecoverRemoteExisting(t *testing.T) { } } - accountRecoverResp := mw.AccountRecover(&pb.AccountRecoverRequest{}) - require.Equal(t, pb.AccountRecoverResponse_Error_NULL, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) + accountRecoverResp := mw.AccountRecover(&pb.RpcAccountRecoverRequest{}) + require.Equal(t, pb.RpcAccountRecoverResponseError_NULL, accountRecoverResp.Error.Code, "AccountRecoverResponse contains error: %+v", accountRecoverResp.Error) - var account *pb.Account + var account *pb.ModelAccount select { case account = <-accountCh: break diff --git a/core/block.go b/core/block.go index 48d732bfe..f76e677c9 100644 --- a/core/block.go +++ b/core/block.go @@ -4,9 +4,9 @@ import ( "github.com/anytypeio/go-anytype-middleware/pb" ) -func (mw *Middleware) BlockCreate(req *pb.BlockCreateRequest) *pb.BlockCreateResponse { - response := func(code pb.BlockCreateResponse_Error_Code, err error) *pb.BlockCreateResponse { - m := &pb.BlockCreateResponse{Error: &pb.BlockCreateResponse_Error{Code: code}} +func (mw *Middleware) BlockCreate(req *pb.RpcBlockCreateRequest) *pb.RpcBlockCreateResponse { + response := func(code pb.RpcBlockCreateResponseErrorCode, err error) *pb.RpcBlockCreateResponse { + m := &pb.RpcBlockCreateResponse{Error: &pb.RpcBlockCreateResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -14,20 +14,20 @@ func (mw *Middleware) BlockCreate(req *pb.BlockCreateRequest) *pb.BlockCreateRes return m } - block := &pb.Block{} // TODO + /*block := &pb.ModelBlock{} // TODO - m := &pb.Event{Message: &pb.Event_BlockCreate{&pb.BlockCreate{Block: block}}} + m := &pb.Event{Message: &pb.EventBlockCreate{&pb.RpcBlockCreate{Block: block}}} if mw.SendEvent != nil { mw.SendEvent(m) - } + }*/ - return response(pb.BlockCreateResponse_Error_NULL, nil) + return response(pb.RpcBlockCreateResponseError_NULL, nil) } -func (mw *Middleware) BlockOpen(req *pb.BlockOpenRequest) *pb.BlockOpenResponse { - response := func(code pb.BlockOpenResponse_Error_Code, err error) *pb.BlockOpenResponse { - m := &pb.BlockOpenResponse{Error: &pb.BlockOpenResponse_Error{Code: code}} +func (mw *Middleware) BlockOpen(req *pb.RpcBlockOpenRequest) *pb.RpcBlockOpenResponse { + response := func(code pb.RpcBlockOpenResponseErrorCode, err error) *pb.RpcBlockOpenResponse { + m := &pb.RpcBlockOpenResponse{Error: &pb.RpcBlockOpenResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -35,20 +35,20 @@ func (mw *Middleware) BlockOpen(req *pb.BlockOpenRequest) *pb.BlockOpenResponse return m } - block := &pb.Block{} // TODO + /*block := &pb.ModelBlock{} // TODO - m := &pb.Event{Message: &pb.Event_BlockShow{&pb.BlockShow{Block: block}}} + m := &pb.Event{Message: &pb.EventBlockShow{&pb.RpcBlockShow{Block: block}}} if mw.SendEvent != nil { mw.SendEvent(m) - } + }*/ - return response(pb.BlockOpenResponse_Error_NULL, nil) + return response(pb.RpcBlockOpenResponseError_NULL, nil) } -func (mw *Middleware) BlockUpdate(req *pb.BlockUpdateRequest) *pb.BlockUpdateResponse { - response := func(code pb.BlockUpdateResponse_Error_Code, err error) *pb.BlockUpdateResponse { - m := &pb.BlockUpdateResponse{Error: &pb.BlockUpdateResponse_Error{Code: code}} +func (mw *Middleware) BlockUpdate(req *pb.RpcBlockUpdateRequest) *pb.RpcBlockUpdateResponse { + response := func(code pb.RpcBlockUpdateResponseErrorCode, err error) *pb.RpcBlockUpdateResponse { + m := &pb.RpcBlockUpdateResponse{Error: &pb.RpcBlockUpdateResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -56,13 +56,14 @@ func (mw *Middleware) BlockUpdate(req *pb.BlockUpdateRequest) *pb.BlockUpdateRes return m } - changes := &pb.BlockChanges{} // TODO + /* + changes := &pb.RpcBlockChanges{} // TODO - m := &pb.Event{Message: &pb.Event_BlockUpdate{&pb.BlockUpdate{changes}}} + m := &pb.Event{Message: &pb.EventBlockUpdate{&pb.RpcBlockUpdate{changes}}} - if mw.SendEvent != nil { - mw.SendEvent(m) - } + if mw.SendEvent != nil { + mw.SendEvent(m) + }*/ - return response(pb.BlockUpdateResponse_Error_NULL, nil) + return response(pb.RpcBlockUpdateResponseError_NULL, nil) } diff --git a/core/core.go b/core/core.go index 3cc3920ff..7eaae668c 100644 --- a/core/core.go +++ b/core/core.go @@ -30,7 +30,7 @@ type Middleware struct { pin string mnemonic string accountSearchCancel context.CancelFunc - localAccounts []*pb.Account + localAccounts []*pb.ModelAccount SendEvent func(event *pb.Event) linkPreview linkpreview.LinkPreview *libCore.Anytype diff --git a/core/history.go b/core/history.go new file mode 100644 index 000000000..7a530d849 --- /dev/null +++ b/core/history.go @@ -0,0 +1,20 @@ +package core + +import ( + "github.com/anytypeio/go-anytype-middleware/pb" +) + +func (mw *Middleware) BlockHistoryMove(req *pb.RpcBlockHistoryMoveRequest) *pb.RpcBlockHistoryMoveResponse { + response := func(code pb.RpcBlockHistoryMoveResponseErrorCode, err error) *pb.RpcBlockHistoryMoveResponse { + m := &pb.RpcBlockHistoryMoveResponse{Error: &pb.RpcBlockHistoryMoveResponseError{Code: code}} + if err != nil { + m.Error.Description = err.Error() + } + + return m + } + + // TODO + + return response(pb.RpcBlockHistoryMoveResponseError_NULL, nil) +} diff --git a/core/ipfs.go b/core/ipfs.go index 2b5b55cb8..37ede5fea 100644 --- a/core/ipfs.go +++ b/core/ipfs.go @@ -9,9 +9,9 @@ import ( "github.com/textileio/go-textile/ipfs" ) -func (mw *Middleware) IpfsGetFile(req *pb.IpfsGetFileRequest) *pb.IpfsGetFileResponse { - response := func(data []byte, media string, name string, code pb.IpfsGetFileResponse_Error_Code, err error) *pb.IpfsGetFileResponse { - m := &pb.IpfsGetFileResponse{Data: data, Media: media, Error: &pb.IpfsGetFileResponse_Error{Code: code}} +func (mw *Middleware) IpfsGetFile(req *pb.RpcIpfsGetFileRequest) *pb.RpcIpfsGetFileResponse { + response := func(data []byte, media string, name string, code pb.RpcIpfsGetFileResponseErrorCode, err error) *pb.RpcIpfsGetFileResponse { + m := &pb.RpcIpfsGetFileResponse{Data: data, Media: media, Error: &pb.RpcIpfsGetFileResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -22,25 +22,25 @@ func (mw *Middleware) IpfsGetFile(req *pb.IpfsGetFileRequest) *pb.IpfsGetFileRes reader, info, err := mw.Anytype.Textile.Node().FileContent(req.Id) if err != nil { if err == core2.ErrFileNotFound { - return response(nil, "", "", pb.IpfsGetFileResponse_Error_NOT_FOUND, err) + return response(nil, "", "", pb.RpcIpfsGetFileResponseError_NOT_FOUND, err) } - return response(nil, "", "", pb.IpfsGetFileResponse_Error_UNKNOWN_ERROR, err) + return response(nil, "", "", pb.RpcIpfsGetFileResponseError_UNKNOWN_ERROR, err) } data, err := ioutil.ReadAll(reader) if err != nil { - return response(nil, "", "", pb.IpfsGetFileResponse_Error_UNKNOWN_ERROR, err) + return response(nil, "", "", pb.RpcIpfsGetFileResponseError_UNKNOWN_ERROR, err) } - return response(data, info.Media, info.Name, pb.IpfsGetFileResponse_Error_NULL, nil) + return response(data, info.Media, info.Name, pb.RpcIpfsGetFileResponseError_NULL, nil) } /* //exportMobile IpfsGetData func IpfsGetData(b []byte) []byte { - response := func(data []byte, code pb.IpfsGetDataResponse_Error_Code, err error) []byte { - m := &pb.IpfsGetDataResponse{Data: data, Error: &pb.IpfsGetDataResponse_Error{Code: code}} + response := func(data []byte, code pb.RpcIpfsGetDataResponseErrorCode, err error) []byte { + m := &pb.RpcIpfsGetDataResponse{Data: data, Error: &pb.RpcIpfsGetDataResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -48,29 +48,29 @@ func IpfsGetData(b []byte) []byte { return Marshal(m) } - var q pb.IpfsGetDataRequest + var q pb.RpcIpfsGetDataRequest err := proto.Unmarshal(b, &q) if err != nil { - return response(nil, pb.IpfsGetDataResponse_Error_BAD_INPUT, err) + return response(nil, pb.RpcIpfsGetDataResponseError_BAD_INPUT, err) } data, err := ipfs.DataAtPath(mw.Anytype.Textile.Node().Ipfs(), q.Id) if err != nil { if err == core2.ErrFileNotFound { - return response(nil, pb.IpfsGetDataResponse_Error_NOT_FOUND, err) + return response(nil, pb.RpcIpfsGetDataResponseError_NOT_FOUND, err) } - return response(nil, pb.IpfsGetDataResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcIpfsGetDataResponseError_UNKNOWN_ERROR, err) } - return response(data, pb.IpfsGetDataResponse_Error_NULL, nil) + return response(data, pb.RpcIpfsGetDataResponseError_NULL, nil) } */ -func (mw *Middleware) ImageGetBlob(req *pb.ImageGetBlobRequest) *pb.ImageGetBlobResponse { - response := func(blob []byte, code pb.ImageGetBlobResponse_Error_Code, err error) *pb.ImageGetBlobResponse { - m := &pb.ImageGetBlobResponse{Blob: blob, Error: &pb.ImageGetBlobResponse_Error{Code: code}} +func (mw *Middleware) ImageGetBlob(req *pb.RpcImageGetBlobRequest) *pb.RpcImageGetBlobResponse { + response := func(blob []byte, code pb.RpcImageGetBlobResponseErrorCode, err error) *pb.RpcImageGetBlobResponse { + m := &pb.RpcImageGetBlobResponse{Blob: blob, Error: &pb.RpcImageGetBlobResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -81,11 +81,11 @@ func (mw *Middleware) ImageGetBlob(req *pb.ImageGetBlobRequest) *pb.ImageGetBlob data, err := ipfs.DataAtPath(mw.Anytype.Textile.Node().Ipfs(), req.Id+"/0/"+strings.ToLower(req.GetSize_().String())+"/content") if err != nil { if err == core2.ErrFileNotFound { - return response(nil, pb.ImageGetBlobResponse_Error_NOT_FOUND, err) + return response(nil, pb.RpcImageGetBlobResponseError_NOT_FOUND, err) } - return response(nil, pb.ImageGetBlobResponse_Error_UNKNOWN_ERROR, err) + return response(nil, pb.RpcImageGetBlobResponseError_UNKNOWN_ERROR, err) } - return response(data, pb.ImageGetBlobResponse_Error_NULL, nil) + return response(data, pb.RpcImageGetBlobResponseError_NULL, nil) } diff --git a/core/linkpreview.go b/core/linkpreview.go deleted file mode 100644 index 0e6765f59..000000000 --- a/core/linkpreview.go +++ /dev/null @@ -1,29 +0,0 @@ -package core - -import ( - "context" - "time" - - "github.com/anytypeio/go-anytype-middleware/pb" -) - -var ( - linkPreviewTimeout = time.Second * 5 -) - -func (mw *Middleware) LinkPreview(req *pb.LinkPreviewRequest) *pb.LinkPreviewResponse { - ctx, cancel := context.WithTimeout(context.Background(), linkPreviewTimeout) - defer cancel() - resp, err := mw.linkPreview.Fetch(ctx, req.Url) - if err != nil { - if err == context.DeadlineExceeded { - return &pb.LinkPreviewResponse{Error: &pb.LinkPreviewResponse_Error{ - Code: pb.LinkPreviewResponse_Error_TIMEOUT, - }} - } - return &pb.LinkPreviewResponse{Error: &pb.LinkPreviewResponse_Error{ - Code: pb.LinkPreviewResponse_Error_UNKNOWN_ERROR, - }} - } - return &resp -} diff --git a/core/logger.go b/core/logger.go index b89888d0b..c40b482fb 100644 --- a/core/logger.go +++ b/core/logger.go @@ -4,9 +4,9 @@ import ( "github.com/anytypeio/go-anytype-middleware/pb" ) -func (mw *Middleware) LogSend(req *pb.LogSendRequest) *pb.LogSendResponse { - response := func(code pb.LogSendResponse_Error_Code, err error) *pb.LogSendResponse { - m := &pb.LogSendResponse{Error: &pb.LogSendResponse_Error{Code: code}} +func (mw *Middleware) LogSend(req *pb.RpcLogSendRequest) *pb.RpcLogSendResponse { + response := func(code pb.RpcLogSendResponseErrorCode, err error) *pb.RpcLogSendResponse { + m := &pb.RpcLogSendResponse{Error: &pb.RpcLogSendResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -15,19 +15,19 @@ func (mw *Middleware) LogSend(req *pb.LogSendRequest) *pb.LogSendResponse { } switch req.Level { - case pb.LogSendRequest_FATAL: + case pb.RpcLogSendRequest_FATAL: log.Fatal(req.Message) - case pb.LogSendRequest_PANIC: + case pb.RpcLogSendRequest_PANIC: log.Panic(req.Message) - case pb.LogSendRequest_DEBUG: + case pb.RpcLogSendRequest_DEBUG: log.Debug(req.Message) - case pb.LogSendRequest_INFO: + case pb.RpcLogSendRequest_INFO: log.Info(req.Message) - case pb.LogSendRequest_WARNING: + case pb.RpcLogSendRequest_WARNING: log.Warning(req.Message) - case pb.LogSendRequest_ERROR: + case pb.RpcLogSendRequest_ERROR: log.Error(req.Message) } - return response(pb.LogSendResponse_Error_NULL, nil) + return response(pb.RpcLogSendResponseError_NULL, nil) } diff --git a/core/logger_test.go b/core/logger_test.go index 1bcd7e629..2d21baeb4 100644 --- a/core/logger_test.go +++ b/core/logger_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" ) -func Test_Log(t *testing.T) { +func TestLog(t *testing.T) { mw := Middleware{} file, err := ioutil.TempFile("", "testlog") require.NoError(t, err) @@ -21,13 +21,13 @@ func Test_Log(t *testing.T) { os.Setenv("GOLOG_FILE", file.Name()) logger.SetupLogging() logger.SetDebugLogging() - for level, levelText := range map[pb.LogSendRequest_Level]string{ - pb.LogSendRequest_ERROR: "[31mERROR", - pb.LogSendRequest_WARNING: "[33mWARNI", + for level, levelText := range map[pb.RpcLogSendRequestLevel]string{ + pb.RpcLogSendRequest_ERROR: "[31mERROR", + pb.RpcLogSendRequest_WARNING: "[33mWARNI", } { text := fmt.Sprintf("test_log_%s", time.Now().String()) - resp := mw.LogSend(&pb.LogSendRequest{Message: text, Level: level}) - require.Equal(t, pb.LogSendResponse_Error_NULL, resp.Error.Code, "LogSendResponse contains error: %+v", resp.Error) + resp := mw.LogSend(&pb.RpcLogSendRequest{Message: text, Level: level}) + require.Equal(t, pb.RpcLogSendResponseError_NULL, resp.Error.Code, "LogSendResponse contains error: %+v", resp.Error) b, err := ioutil.ReadFile(file.Name()) require.NoError(t, err) diff --git a/core/version.go b/core/version.go index 357a5f7c3..e0b40e28e 100644 --- a/core/version.go +++ b/core/version.go @@ -9,9 +9,9 @@ import ( // Set by ldflags var GitCommit, GitBranch, GitState, GitSummary, BuildDate string -func (mw *Middleware) VersionGet(req *pb.VersionGetRequest) *pb.VersionGetResponse { - response := func(version, details string, code pb.VersionGetResponse_Error_Code, err error) *pb.VersionGetResponse { - m := &pb.VersionGetResponse{Version: version, Error: &pb.VersionGetResponse_Error{Code: code}} +func (mw *Middleware) VersionGet(req *pb.RpcVersionGetRequest) *pb.RpcVersionGetResponse { + response := func(version, details string, code pb.RpcVersionGetResponseErrorCode, err error) *pb.RpcVersionGetResponse { + m := &pb.RpcVersionGetResponse{Version: version, Error: &pb.RpcVersionGetResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -20,10 +20,10 @@ func (mw *Middleware) VersionGet(req *pb.VersionGetRequest) *pb.VersionGetRespon } if len(GitSummary) == 0 { - return response("", "", pb.VersionGetResponse_Error_VERSION_IS_EMPTY, nil) + return response("", "", pb.RpcVersionGetResponseError_VERSION_IS_EMPTY, nil) } details := fmt.Sprintf("build on %s from %s at #%s(%s)", BuildDate, GitCommit, GitBranch, GitState) - return response(GitSummary, details, pb.VersionGetResponse_Error_NULL, nil) + return response(GitSummary, details, pb.RpcVersionGetResponseError_NULL, nil) } diff --git a/core/wallet.go b/core/wallet.go index 6cf47c99c..5a262aaef 100644 --- a/core/wallet.go +++ b/core/wallet.go @@ -9,9 +9,9 @@ import ( const wordCount int = 12 -func (mw *Middleware) WalletCreate(req *pb.WalletCreateRequest) *pb.WalletCreateResponse { - response := func(mnemonic string, code pb.WalletCreateResponse_Error_Code, err error) *pb.WalletCreateResponse { - m := &pb.WalletCreateResponse{Mnemonic: mnemonic, Error: &pb.WalletCreateResponse_Error{Code: code}} +func (mw *Middleware) WalletCreate(req *pb.RpcWalletCreateRequest) *pb.RpcWalletCreateResponse { + response := func(mnemonic string, code pb.RpcWalletCreateResponseErrorCode, err error) *pb.RpcWalletCreateResponse { + m := &pb.RpcWalletCreateResponse{Mnemonic: mnemonic, Error: &pb.RpcWalletCreateResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -24,22 +24,22 @@ func (mw *Middleware) WalletCreate(req *pb.WalletCreateRequest) *pb.WalletCreate err := os.MkdirAll(mw.rootPath, 0700) if err != nil { - return response("", pb.WalletCreateResponse_Error_FAILED_TO_CREATE_LOCAL_REPO, err) + return response("", pb.RpcWalletCreateResponseError_FAILED_TO_CREATE_LOCAL_REPO, err) } mnemonic, err := core.WalletGenerateMnemonic(wordCount) if err != nil { - return response("", pb.WalletCreateResponse_Error_UNKNOWN_ERROR, err) + return response("", pb.RpcWalletCreateResponseError_UNKNOWN_ERROR, err) } mw.mnemonic = mnemonic - return response(mnemonic, pb.WalletCreateResponse_Error_NULL, nil) + return response(mnemonic, pb.RpcWalletCreateResponseError_NULL, nil) } -func (mw *Middleware) WalletRecover(req *pb.WalletRecoverRequest) *pb.WalletRecoverResponse { - response := func(code pb.WalletRecoverResponse_Error_Code, err error) *pb.WalletRecoverResponse { - m := &pb.WalletRecoverResponse{Error: &pb.WalletRecoverResponse_Error{Code: code}} +func (mw *Middleware) WalletRecover(req *pb.RpcWalletRecoverRequest) *pb.RpcWalletRecoverResponse { + response := func(code pb.RpcWalletRecoverResponseErrorCode, err error) *pb.RpcWalletRecoverResponse { + m := &pb.RpcWalletRecoverResponse{Error: &pb.RpcWalletRecoverResponseError{Code: code}} if err != nil { m.Error.Description = err.Error() } @@ -56,14 +56,14 @@ func (mw *Middleware) WalletRecover(req *pb.WalletRecoverRequest) *pb.WalletReco err := os.MkdirAll(mw.rootPath, 0700) if err != nil { - return response(pb.WalletRecoverResponse_Error_FAILED_TO_CREATE_LOCAL_REPO, err) + return response(pb.RpcWalletRecoverResponseError_FAILED_TO_CREATE_LOCAL_REPO, err) } // test if mnemonic is correct _, err = core.WalletAccountAt(req.Mnemonic, 0, "") if err != nil { - return response(pb.WalletRecoverResponse_Error_BAD_INPUT, err) + return response(pb.RpcWalletRecoverResponseError_BAD_INPUT, err) } - return response(pb.WalletRecoverResponse_Error_NULL, nil) + return response(pb.RpcWalletRecoverResponseError_NULL, nil) } diff --git a/docs/proto.md b/docs/proto.md new file mode 100644 index 000000000..24ebe54c1 --- /dev/null +++ b/docs/proto.md @@ -0,0 +1,2446 @@ +# Protocol Documentation + + +## Table of Contents + +- [service/service.proto](#service/service.proto) + + + + - [ClientCommands](#anytype.ClientCommands) + + +- [changes.proto](#changes.proto) + - [BlockChanges](#anytype.BlockChanges) + - [BlocksListSingleChange](#anytype.BlocksListSingleChange) + - [Change](#anytype.Change) + - [Change.Block](#anytype.Change.Block) + - [Change.Block.Children](#anytype.Change.Block.Children) + - [Change.Block.Content](#anytype.Change.Block.Content) + - [Change.Block.Content.Dashboard](#anytype.Change.Block.Content.Dashboard) + - [Change.Block.Content.Media](#anytype.Change.Block.Content.Media) + - [Change.Block.Content.Page](#anytype.Change.Block.Content.Page) + - [Change.Block.Content.Text](#anytype.Change.Block.Content.Text) + - [Change.Block.Header](#anytype.Change.Block.Header) + + + + + +- [commands.proto](#commands.proto) + - [Rpc](#anytype.Rpc) + - [Rpc.Account](#anytype.Rpc.Account) + - [Rpc.Account.Create](#anytype.Rpc.Account.Create) + - [Rpc.Account.Create.Request](#anytype.Rpc.Account.Create.Request) + - [Rpc.Account.Create.Response](#anytype.Rpc.Account.Create.Response) + - [Rpc.Account.Create.Response.Error](#anytype.Rpc.Account.Create.Response.Error) + - [Rpc.Account.Recover](#anytype.Rpc.Account.Recover) + - [Rpc.Account.Recover.Request](#anytype.Rpc.Account.Recover.Request) + - [Rpc.Account.Recover.Response](#anytype.Rpc.Account.Recover.Response) + - [Rpc.Account.Recover.Response.Error](#anytype.Rpc.Account.Recover.Response.Error) + - [Rpc.Account.Select](#anytype.Rpc.Account.Select) + - [Rpc.Account.Select.Request](#anytype.Rpc.Account.Select.Request) + - [Rpc.Account.Select.Response](#anytype.Rpc.Account.Select.Response) + - [Rpc.Account.Select.Response.Error](#anytype.Rpc.Account.Select.Response.Error) + - [Rpc.Block](#anytype.Rpc.Block) + - [Rpc.Block.Create](#anytype.Rpc.Block.Create) + - [Rpc.Block.Create.Request](#anytype.Rpc.Block.Create.Request) + - [Rpc.Block.Create.Response](#anytype.Rpc.Block.Create.Response) + - [Rpc.Block.Create.Response.Error](#anytype.Rpc.Block.Create.Response.Error) + - [Rpc.Block.History](#anytype.Rpc.Block.History) + - [Rpc.Block.History.Move](#anytype.Rpc.Block.History.Move) + - [Rpc.Block.History.Move.Request](#anytype.Rpc.Block.History.Move.Request) + - [Rpc.Block.History.Move.Response](#anytype.Rpc.Block.History.Move.Response) + - [Rpc.Block.History.Move.Response.Error](#anytype.Rpc.Block.History.Move.Response.Error) + - [Rpc.Block.Open](#anytype.Rpc.Block.Open) + - [Rpc.Block.Open.Request](#anytype.Rpc.Block.Open.Request) + - [Rpc.Block.Open.Response](#anytype.Rpc.Block.Open.Response) + - [Rpc.Block.Open.Response.Error](#anytype.Rpc.Block.Open.Response.Error) + - [Rpc.Block.Update](#anytype.Rpc.Block.Update) + - [Rpc.Block.Update.Request](#anytype.Rpc.Block.Update.Request) + - [Rpc.Block.Update.Response](#anytype.Rpc.Block.Update.Response) + - [Rpc.Block.Update.Response.Error](#anytype.Rpc.Block.Update.Response.Error) + - [Rpc.Image](#anytype.Rpc.Image) + - [Rpc.Image.Get](#anytype.Rpc.Image.Get) + - [Rpc.Image.Get.Blob](#anytype.Rpc.Image.Get.Blob) + - [Rpc.Image.Get.Blob.Request](#anytype.Rpc.Image.Get.Blob.Request) + - [Rpc.Image.Get.Blob.Response](#anytype.Rpc.Image.Get.Blob.Response) + - [Rpc.Image.Get.Blob.Response.Error](#anytype.Rpc.Image.Get.Blob.Response.Error) + - [Rpc.Image.Get.File](#anytype.Rpc.Image.Get.File) + - [Rpc.Image.Get.File.Request](#anytype.Rpc.Image.Get.File.Request) + - [Rpc.Image.Get.File.Response](#anytype.Rpc.Image.Get.File.Response) + - [Rpc.Image.Get.File.Response.Error](#anytype.Rpc.Image.Get.File.Response.Error) + - [Rpc.Ipfs](#anytype.Rpc.Ipfs) + - [Rpc.Ipfs.Get](#anytype.Rpc.Ipfs.Get) + - [Rpc.Ipfs.Get.File](#anytype.Rpc.Ipfs.Get.File) + - [Rpc.Ipfs.Get.File.Request](#anytype.Rpc.Ipfs.Get.File.Request) + - [Rpc.Ipfs.Get.File.Response](#anytype.Rpc.Ipfs.Get.File.Response) + - [Rpc.Ipfs.Get.File.Response.Error](#anytype.Rpc.Ipfs.Get.File.Response.Error) + - [Rpc.Log](#anytype.Rpc.Log) + - [Rpc.Log.Send](#anytype.Rpc.Log.Send) + - [Rpc.Log.Send.Request](#anytype.Rpc.Log.Send.Request) + - [Rpc.Log.Send.Response](#anytype.Rpc.Log.Send.Response) + - [Rpc.Log.Send.Response.Error](#anytype.Rpc.Log.Send.Response.Error) + - [Rpc.Version](#anytype.Rpc.Version) + - [Rpc.Version.Get](#anytype.Rpc.Version.Get) + - [Rpc.Version.Get.Request](#anytype.Rpc.Version.Get.Request) + - [Rpc.Version.Get.Response](#anytype.Rpc.Version.Get.Response) + - [Rpc.Version.Get.Response.Error](#anytype.Rpc.Version.Get.Response.Error) + - [Rpc.Wallet](#anytype.Rpc.Wallet) + - [Rpc.Wallet.Create](#anytype.Rpc.Wallet.Create) + - [Rpc.Wallet.Create.Request](#anytype.Rpc.Wallet.Create.Request) + - [Rpc.Wallet.Create.Response](#anytype.Rpc.Wallet.Create.Response) + - [Rpc.Wallet.Create.Response.Error](#anytype.Rpc.Wallet.Create.Response.Error) + - [Rpc.Wallet.Recover](#anytype.Rpc.Wallet.Recover) + - [Rpc.Wallet.Recover.Request](#anytype.Rpc.Wallet.Recover.Request) + - [Rpc.Wallet.Recover.Response](#anytype.Rpc.Wallet.Recover.Response) + - [Rpc.Wallet.Recover.Response.Error](#anytype.Rpc.Wallet.Recover.Response.Error) + + - [Rpc.Account.Create.Response.Error.Code](#anytype.Rpc.Account.Create.Response.Error.Code) + - [Rpc.Account.Recover.Response.Error.Code](#anytype.Rpc.Account.Recover.Response.Error.Code) + - [Rpc.Account.Select.Response.Error.Code](#anytype.Rpc.Account.Select.Response.Error.Code) + - [Rpc.Block.Create.Response.Error.Code](#anytype.Rpc.Block.Create.Response.Error.Code) + - [Rpc.Block.History.Move.Response.Error.Code](#anytype.Rpc.Block.History.Move.Response.Error.Code) + - [Rpc.Block.Open.Response.Error.Code](#anytype.Rpc.Block.Open.Response.Error.Code) + - [Rpc.Block.Update.Response.Error.Code](#anytype.Rpc.Block.Update.Response.Error.Code) + - [Rpc.Image.Get.Blob.Response.Error.Code](#anytype.Rpc.Image.Get.Blob.Response.Error.Code) + - [Rpc.Image.Get.File.Response.Error.Code](#anytype.Rpc.Image.Get.File.Response.Error.Code) + - [Rpc.Ipfs.Get.File.Response.Error.Code](#anytype.Rpc.Ipfs.Get.File.Response.Error.Code) + - [Rpc.Log.Send.Request.Level](#anytype.Rpc.Log.Send.Request.Level) + - [Rpc.Log.Send.Response.Error.Code](#anytype.Rpc.Log.Send.Response.Error.Code) + - [Rpc.Version.Get.Response.Error.Code](#anytype.Rpc.Version.Get.Response.Error.Code) + - [Rpc.Wallet.Create.Response.Error.Code](#anytype.Rpc.Wallet.Create.Response.Error.Code) + - [Rpc.Wallet.Recover.Response.Error.Code](#anytype.Rpc.Wallet.Recover.Response.Error.Code) + + + + +- [events.proto](#events.proto) + - [Event](#anytype.Event) + - [Event.Account](#anytype.Event.Account) + - [Event.Account.Show](#anytype.Event.Account.Show) + - [Event.Block](#anytype.Event.Block) + - [Event.Block.Create](#anytype.Event.Block.Create) + - [Event.Block.FilesUpload](#anytype.Event.Block.FilesUpload) + - [Event.Block.Show](#anytype.Event.Block.Show) + - [Event.Block.Update](#anytype.Event.Block.Update) + - [Event.User](#anytype.Event.User) + - [Event.User.Block](#anytype.Event.User.Block) + - [Event.User.Block.Join](#anytype.Event.User.Block.Join) + - [Event.User.Block.Left](#anytype.Event.User.Block.Left) + - [Event.User.Block.SelectRange](#anytype.Event.User.Block.SelectRange) + - [Event.User.Block.TextRange](#anytype.Event.User.Block.TextRange) + + + + + +- [models.proto](#models.proto) + - [Model](#anytype.Model) + - [Model.Account](#anytype.Model.Account) + - [Model.Account.Avatar](#anytype.Model.Account.Avatar) + - [Model.Block](#anytype.Model.Block) + - [Model.Block.Content](#anytype.Model.Block.Content) + - [Model.Block.Content.Dashboard](#anytype.Model.Block.Content.Dashboard) + - [Model.Block.Content.Dataview](#anytype.Model.Block.Content.Dataview) + - [Model.Block.Content.Div](#anytype.Model.Block.Content.Div) + - [Model.Block.Content.Layout](#anytype.Model.Block.Content.Layout) + - [Model.Block.Content.Media](#anytype.Model.Block.Content.Media) + - [Model.Block.Content.Media.FilePreview](#anytype.Model.Block.Content.Media.FilePreview) + - [Model.Block.Content.Media.ImagePreview](#anytype.Model.Block.Content.Media.ImagePreview) + - [Model.Block.Content.Media.VideoPreview](#anytype.Model.Block.Content.Media.VideoPreview) + - [Model.Block.Content.Page](#anytype.Model.Block.Content.Page) + - [Model.Block.Content.Text](#anytype.Model.Block.Content.Text) + - [Model.Block.Content.Text.Mark](#anytype.Model.Block.Content.Text.Mark) + - [Model.Block.Content.Text.Marks](#anytype.Model.Block.Content.Text.Marks) + - [Model.Block.Header](#anytype.Model.Block.Header) + - [Model.Block.Header.Permissions](#anytype.Model.Block.Header.Permissions) + - [Model.Image](#anytype.Model.Image) + - [Model.Preview](#anytype.Model.Preview) + - [Model.Preview.Link](#anytype.Model.Preview.Link) + - [Model.Range](#anytype.Model.Range) + - [Model.Struct](#anytype.Model.Struct) + - [Model.Struct.FieldsEntry](#anytype.Model.Struct.FieldsEntry) + - [Model.Struct.ListValue](#anytype.Model.Struct.ListValue) + - [Model.Struct.Value](#anytype.Model.Struct.Value) + - [Model.Video](#anytype.Model.Video) + + - [Model.Block.Content.Dashboard.Style](#anytype.Model.Block.Content.Dashboard.Style) + - [Model.Block.Content.Layout.Style](#anytype.Model.Block.Content.Layout.Style) + - [Model.Block.Content.Media.State](#anytype.Model.Block.Content.Media.State) + - [Model.Block.Content.Page.Style](#anytype.Model.Block.Content.Page.Style) + - [Model.Block.Content.Text.Mark.Type](#anytype.Model.Block.Content.Text.Mark.Type) + - [Model.Block.Content.Text.MarkerType](#anytype.Model.Block.Content.Text.MarkerType) + - [Model.Block.Content.Text.Style](#anytype.Model.Block.Content.Text.Style) + - [Model.Block.Header.Type](#anytype.Model.Block.Header.Type) + - [Model.Image.Size](#anytype.Model.Image.Size) + - [Model.Preview.Link.Type](#anytype.Model.Preview.Link.Type) + - [Model.Struct.NullValue](#anytype.Model.Struct.NullValue) + - [Model.Video.Size](#anytype.Model.Video.Size) + + + + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

+ +## service/service.proto + + + + + + + + + + + +### ClientCommands + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| WalletCreate | [Rpc.Wallet.Create.Request](#anytype.Rpc.Wallet.Create.Request) | [Rpc.Wallet.Create.Response](#anytype.Rpc.Wallet.Create.Response) | | +| WalletRecover | [Rpc.Wallet.Recover.Request](#anytype.Rpc.Wallet.Recover.Request) | [Rpc.Wallet.Recover.Response](#anytype.Rpc.Wallet.Recover.Response) | | +| AccountRecover | [Rpc.Account.Recover.Request](#anytype.Rpc.Account.Recover.Request) | [Rpc.Account.Recover.Response](#anytype.Rpc.Account.Recover.Response) | | +| AccountCreate | [Rpc.Account.Create.Request](#anytype.Rpc.Account.Create.Request) | [Rpc.Account.Create.Response](#anytype.Rpc.Account.Create.Response) | | +| AccountSelect | [Rpc.Account.Select.Request](#anytype.Rpc.Account.Select.Request) | [Rpc.Account.Select.Response](#anytype.Rpc.Account.Select.Response) | | +| ImageGetBlob | [Rpc.Image.Get.Blob.Request](#anytype.Rpc.Image.Get.Blob.Request) | [Rpc.Image.Get.Blob.Response](#anytype.Rpc.Image.Get.Blob.Response) | | +| VersionGet | [Rpc.Version.Get.Request](#anytype.Rpc.Version.Get.Request) | [Rpc.Version.Get.Response](#anytype.Rpc.Version.Get.Response) | | +| LogSend | [Rpc.Log.Send.Request](#anytype.Rpc.Log.Send.Request) | [Rpc.Log.Send.Response](#anytype.Rpc.Log.Send.Response) | | +| BlockOpen | [Rpc.Block.Open.Request](#anytype.Rpc.Block.Open.Request) | [Rpc.Block.Open.Response](#anytype.Rpc.Block.Open.Response) | | +| BlockCreate | [Rpc.Block.Create.Request](#anytype.Rpc.Block.Create.Request) | [Rpc.Block.Create.Response](#anytype.Rpc.Block.Create.Response) | | +| BlockUpdate | [Rpc.Block.Update.Request](#anytype.Rpc.Block.Update.Request) | [Rpc.Block.Update.Response](#anytype.Rpc.Block.Update.Response) | | +| BlockHistoryMove | [Rpc.Block.History.Move.Request](#anytype.Rpc.Block.History.Move.Request) | [Rpc.Block.History.Move.Response](#anytype.Rpc.Block.History.Move.Response) | rpc BlockFilesUpload (Block Rpc.History.Move.Request) returns (BlockRpc..History Move.Response); | + + + + + + +

Top

+ +## changes.proto + + + + + +### BlockChanges + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| changes | [BlocksListSingleChange](#anytype.BlocksListSingleChange) | repeated | | + + + + + + + + +### BlocksListSingleChange + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | repeated | | +| text | [Change.Block.Content.Text](#anytype.Change.Block.Content.Text) | | | +| blockHeader | [Change.Block.Header](#anytype.Change.Block.Header) | | | +| blockChildren | [Change.Block.Children](#anytype.Change.Block.Children) | | | +| page | [Change.Block.Content.Page](#anytype.Change.Block.Content.Page) | | | +| dashboard | [Change.Block.Content.Dashboard](#anytype.Change.Block.Content.Dashboard) | | | +| media | [Change.Block.Content.Media](#anytype.Change.Block.Content.Media) | | | + + + + + + + + +### Change + + + + + + + + + +### Change.Block + + + + + + + + + +### Change.Block.Children + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| children | [string](#string) | repeated | | + + + + + + + + +### Change.Block.Content + + + + + + + + + +### Change.Block.Content.Dashboard + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| style | [Model.Block.Content.Dashboard.Style](#anytype.Model.Block.Content.Dashboard.Style) | | | +| header | [Model.Block.Header](#anytype.Model.Block.Header) | | not a dashboard header – one of children | + + + + + + + + +### Change.Block.Content.Media + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| link | [string](#string) | | | +| state | [Model.Block.Content.Media.State](#anytype.Model.Block.Content.Media.State) | | | + + + + + + + + +### Change.Block.Content.Page + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| style | [Model.Block.Content.Page.Style](#anytype.Model.Block.Content.Page.Style) | | | +| block | [Model.Block](#anytype.Model.Block) | | | + + + + + + + + +### Change.Block.Content.Text + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| text | [string](#string) | | | +| style | [Model.Block.Content.Text.Style](#anytype.Model.Block.Content.Text.Style) | | | +| marks | [Model.Block.Content.Text.Marks](#anytype.Model.Block.Content.Text.Marks) | | | +| toggleable | [bool](#bool) | | | +| markerType | [Model.Block.Content.Text.MarkerType](#anytype.Model.Block.Content.Text.MarkerType) | | | +| checkable | [bool](#bool) | | | +| checked | [bool](#bool) | | | + + + + + + + + +### Change.Block.Header + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| type | [Model.Block.Header.Type](#anytype.Model.Block.Header.Type) | | | +| name | [string](#string) | | | +| icon | [string](#string) | | | +| permissions | [Model.Block.Header.Permissions](#anytype.Model.Block.Header.Permissions) | | | + + + + + + + + + + + + + + + + +

Top

+ +## commands.proto + + + + + +### Rpc + + + + + + + + + +### Rpc.Account + + + + + + + + + +### Rpc.Account.Create + + + + + + + + + +### Rpc.Account.Create.Request +Front end to middleware request-to-create-an account + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | Account name | +| avatarLocalPath | [string](#string) | | Path to an image, that will be used as an avatar of this account | +| avatarColor | [string](#string) | | Avatar color as an alternative for avatar image | + + + + + + + + +### Rpc.Account.Create.Response +Middleware-to-front-end response for an account creation request, that can contain a NULL error and created account or a non-NULL error and an empty account + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Account.Create.Response.Error](#anytype.Rpc.Account.Create.Response.Error) | | Error while trying to create an account | +| account | [Model.Account](#anytype.Model.Account) | | A newly created account; In case of a failure, i.e. error is non-NULL, the account model should contain empty/default-value fields | + + + + + + + + +### Rpc.Account.Create.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Account.Create.Response.Error.Code](#anytype.Rpc.Account.Create.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Account.Recover + + + + + + + + + +### Rpc.Account.Recover.Request +Front end to middleware request-to-start-search of an accounts for a recovered mnemonic. +Each of an account that would be found will come with an AccountAdd event + + + + + + + + +### Rpc.Account.Recover.Response +Middleware-to-front-end response to an account recover request, that can contain a NULL error and created account or a non-NULL error and an empty account + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Account.Recover.Response.Error](#anytype.Rpc.Account.Recover.Response.Error) | | Error while trying to recover an account | + + + + + + + + +### Rpc.Account.Recover.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Account.Recover.Response.Error.Code](#anytype.Rpc.Account.Recover.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Account.Select + + + + + + + + + +### Rpc.Account.Select.Request +Front end to middleware request-to-launch-a specific account using account id and a root path +User can select an account from those, that came with an AccountAdd events + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | Id of a selected account | +| rootPath | [string](#string) | | Root path is optional, set if this is a first request | + + + + + + + + +### Rpc.Account.Select.Response +Middleware-to-front-end response for an account select request, that can contain a NULL error and selected account or a non-NULL error and an empty account + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Account.Select.Response.Error](#anytype.Rpc.Account.Select.Response.Error) | | Error while trying to launch/select an account | +| account | [Model.Account](#anytype.Model.Account) | | Selected account | + + + + + + + + +### Rpc.Account.Select.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Account.Select.Response.Error.Code](#anytype.Rpc.Account.Select.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Block + + + + + + + + + +### Rpc.Block.Create + + + + + + + + + +### Rpc.Block.Create.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [Model.Block.Header.Type](#anytype.Model.Block.Header.Type) | | | +| contextBlockId | [string](#string) | | | + + + + + + + + +### Rpc.Block.Create.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Block.Create.Response.Error](#anytype.Rpc.Block.Create.Response.Error) | | | + + + + + + + + +### Rpc.Block.Create.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Block.Create.Response.Error.Code](#anytype.Rpc.Block.Create.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Block.History + + + + + + + + + +### Rpc.Block.History.Move + + + + + + + + + +### Rpc.Block.History.Move.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| contextBlockId | [string](#string) | | | +| moveForward | [bool](#bool) | | | + + + + + + + + +### Rpc.Block.History.Move.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Block.History.Move.Response.Error](#anytype.Rpc.Block.History.Move.Response.Error) | | | + + + + + + + + +### Rpc.Block.History.Move.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Block.History.Move.Response.Error.Code](#anytype.Rpc.Block.History.Move.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Block.Open + + + + + + + + + +### Rpc.Block.Open.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### Rpc.Block.Open.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Block.Open.Response.Error](#anytype.Rpc.Block.Open.Response.Error) | | | +| blockHeader | [Model.Block.Header](#anytype.Model.Block.Header) | | | + + + + + + + + +### Rpc.Block.Open.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Block.Open.Response.Error.Code](#anytype.Rpc.Block.Open.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Block.Update + + + + + + + + + +### Rpc.Block.Update.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| changes | [BlockChanges](#anytype.BlockChanges) | | | + + + + + + + + +### Rpc.Block.Update.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Block.Update.Response.Error](#anytype.Rpc.Block.Update.Response.Error) | | | + + + + + + + + +### Rpc.Block.Update.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Block.Update.Response.Error.Code](#anytype.Rpc.Block.Update.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Image + + + + + + + + + +### Rpc.Image.Get + + + + + + + + + +### Rpc.Image.Get.Blob + + + + + + + + + +### Rpc.Image.Get.Blob.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| size | [Model.Image.Size](#anytype.Model.Image.Size) | | | + + + + + + + + +### Rpc.Image.Get.Blob.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Image.Get.Blob.Response.Error](#anytype.Rpc.Image.Get.Blob.Response.Error) | | | +| blob | [bytes](#bytes) | | | + + + + + + + + +### Rpc.Image.Get.Blob.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Image.Get.Blob.Response.Error.Code](#anytype.Rpc.Image.Get.Blob.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Image.Get.File + + + + + + + + + +### Rpc.Image.Get.File.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| size | [Model.Image.Size](#anytype.Model.Image.Size) | | | + + + + + + + + +### Rpc.Image.Get.File.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Image.Get.File.Response.Error](#anytype.Rpc.Image.Get.File.Response.Error) | | | +| localPath | [string](#string) | | | + + + + + + + + +### Rpc.Image.Get.File.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Image.Get.File.Response.Error.Code](#anytype.Rpc.Image.Get.File.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Ipfs + + + + + + + + + +### Rpc.Ipfs.Get + + + + + + + + + +### Rpc.Ipfs.Get.File + + + + + + + + + +### Rpc.Ipfs.Get.File.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### Rpc.Ipfs.Get.File.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Ipfs.Get.File.Response.Error](#anytype.Rpc.Ipfs.Get.File.Response.Error) | | | +| data | [bytes](#bytes) | | | +| media | [string](#string) | | | +| name | [string](#string) | | | + + + + + + + + +### Rpc.Ipfs.Get.File.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Ipfs.Get.File.Response.Error.Code](#anytype.Rpc.Ipfs.Get.File.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Log + + + + + + + + + +### Rpc.Log.Send + + + + + + + + + +### Rpc.Log.Send.Request + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| message | [string](#string) | | | +| level | [Rpc.Log.Send.Request.Level](#anytype.Rpc.Log.Send.Request.Level) | | | + + + + + + + + +### Rpc.Log.Send.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Log.Send.Response.Error](#anytype.Rpc.Log.Send.Response.Error) | | | + + + + + + + + +### Rpc.Log.Send.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Log.Send.Response.Error.Code](#anytype.Rpc.Log.Send.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Version + + + + + + + + + +### Rpc.Version.Get + + + + + + + + + +### Rpc.Version.Get.Request + + + + + + + + + +### Rpc.Version.Get.Response + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Version.Get.Response.Error](#anytype.Rpc.Version.Get.Response.Error) | | | +| version | [string](#string) | | | + + + + + + + + +### Rpc.Version.Get.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Version.Get.Response.Error.Code](#anytype.Rpc.Version.Get.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Wallet + + + + + + + + + +### Rpc.Wallet.Create + + + + + + + + + +### Rpc.Wallet.Create.Request +Front-end-to-middleware request to create a new wallet + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| rootPath | [string](#string) | | Path to a wallet directory | + + + + + + + + +### Rpc.Wallet.Create.Response +Middleware-to-front-end response, that can contain mnemonic of a created account and a NULL error or an empty mnemonic and a non-NULL error + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Wallet.Create.Response.Error](#anytype.Rpc.Wallet.Create.Response.Error) | | | +| mnemonic | [string](#string) | | Mnemonic of a new account (sequence of words, divided by spaces) | + + + + + + + + +### Rpc.Wallet.Create.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Wallet.Create.Response.Error.Code](#anytype.Rpc.Wallet.Create.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + +### Rpc.Wallet.Recover + + + + + + + + + +### Rpc.Wallet.Recover.Request +Front end to middleware request-to-recover-a wallet with this mnemonic and a rootPath + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| rootPath | [string](#string) | | Path to a wallet directory | +| mnemonic | [string](#string) | | Mnemonic of a wallet to recover | + + + + + + + + +### Rpc.Wallet.Recover.Response +Middleware-to-front-end response, that can contain a NULL error or a non-NULL error + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [Rpc.Wallet.Recover.Response.Error](#anytype.Rpc.Wallet.Recover.Response.Error) | | Error while trying to recover a wallet | + + + + + + + + +### Rpc.Wallet.Recover.Response.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Rpc.Wallet.Recover.Response.Error.Code](#anytype.Rpc.Wallet.Recover.Response.Error.Code) | | | +| description | [string](#string) | | | + + + + + + + + + + +### Rpc.Account.Create.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | No error; Account should be non-empty | +| UNKNOWN_ERROR | 1 | Any other errors | +| BAD_INPUT | 2 | Avatar or name is not correct | +| ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE | 101 | | +| ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME | 102 | | +| ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR | 103 | | + + + + + +### Rpc.Account.Recover.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | No error; | +| UNKNOWN_ERROR | 1 | Any other errors | +| BAD_INPUT | 2 | | +| NO_ACCOUNTS_FOUND | 101 | | +| NEED_TO_RECOVER_WALLET_FIRST | 102 | | +| FAILED_TO_CREATE_LOCAL_REPO | 103 | | +| LOCAL_REPO_EXISTS_BUT_CORRUPTED | 104 | | +| FAILED_TO_RUN_NODE | 105 | | +| WALLET_RECOVER_NOT_PERFORMED | 106 | | + + + + + +### Rpc.Account.Select.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | No error | +| UNKNOWN_ERROR | 1 | Any other errors | +| BAD_INPUT | 2 | Id or root path is wrong | +| FAILED_TO_CREATE_LOCAL_REPO | 101 | | +| LOCAL_REPO_EXISTS_BUT_CORRUPTED | 102 | | +| FAILED_TO_RUN_NODE | 103 | | +| FAILED_TO_FIND_ACCOUNT_INFO | 104 | | +| LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET | 105 | | + + + + + +### Rpc.Block.Create.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | ... | + + + + + +### Rpc.Block.History.Move.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | | +| CAN_NOT_MOVE | 3 | ... | + + + + + +### Rpc.Block.Open.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | ... | + + + + + +### Rpc.Block.Update.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | ... | + + + + + +### Rpc.Image.Get.Blob.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | ... | +| NOT_FOUND | 101 | | +| TIMEOUT | 102 | | + + + + + +### Rpc.Image.Get.File.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | ... | +| NOT_FOUND | 101 | | +| TIMEOUT | 102 | | + + + + + +### Rpc.Ipfs.Get.File.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | ... | +| NOT_FOUND | 101 | | +| TIMEOUT | 102 | | + + + + + +### Rpc.Log.Send.Request.Level + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| DEBUG | 0 | | +| ERROR | 1 | | +| FATAL | 2 | | +| INFO | 3 | | +| PANIC | 4 | | +| WARNING | 5 | | + + + + + +### Rpc.Log.Send.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | | +| NOT_FOUND | 101 | | +| TIMEOUT | 102 | | + + + + + +### Rpc.Version.Get.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | | +| UNKNOWN_ERROR | 1 | | +| BAD_INPUT | 2 | | +| VERSION_IS_EMPTY | 3 | | +| NOT_FOUND | 101 | | +| TIMEOUT | 102 | | + + + + + +### Rpc.Wallet.Create.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | No error; mnemonic should be non-empty | +| UNKNOWN_ERROR | 1 | Any other errors | +| BAD_INPUT | 2 | Root path is wrong | +| FAILED_TO_CREATE_LOCAL_REPO | 101 | ... | + + + + + +### Rpc.Wallet.Recover.Response.Error.Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL | 0 | No error; wallet successfully recovered | +| UNKNOWN_ERROR | 1 | Any other errors | +| BAD_INPUT | 2 | Root path or mnemonic is wrong | +| FAILED_TO_CREATE_LOCAL_REPO | 101 | | + + + + + + + + + + + +

Top

+ +## events.proto + + + + + +### Event + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| accountShow | [Event.Account.Show](#anytype.Event.Account.Show) | | show wallet's accounts that were loaded from local or remote source | +| blockShow | [Event.Block.Show](#anytype.Event.Block.Show) | | | +| blockUpdate | [Event.Block.Update](#anytype.Event.Block.Update) | | | +| blockCreate | [Event.Block.Create](#anytype.Event.Block.Create) | | | +| userBlockTextRange | [Event.User.Block.TextRange](#anytype.Event.User.Block.TextRange) | | | +| userBlockJoin | [Event.User.Block.Join](#anytype.Event.User.Block.Join) | | | +| userBlockLeft | [Event.User.Block.Left](#anytype.Event.User.Block.Left) | | | +| userBlockSelectRange | [Event.User.Block.SelectRange](#anytype.Event.User.Block.SelectRange) | | | +| filesUpload | [Event.Block.FilesUpload](#anytype.Event.Block.FilesUpload) | | | + + + + + + + + +### Event.Account + + + + + + + + + +### Event.Account.Show +Message, that will be sent to the front on each account found after an AccountRecoverRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| index | [int64](#int64) | | Number of an account in an all found accounts list | +| account | [Model.Account](#anytype.Model.Account) | | An Account, that has been found for the mnemonic | + + + + + + + + +### Event.Block + + + + + + + + + +### Event.Block.Create + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| block | [Model.Block](#anytype.Model.Block) | | | + + + + + + + + +### Event.Block.FilesUpload +Middleware to front end event message, that will be sent on one of this scenarios: +Precondition: user A opened a block +1. User A drops a set of files/pictures/videos +2. User A creates a MediaBlock and drops a single media, that corresponds to its type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| filePath | [string](#string) | repeated | filepaths to the files | +| blockId | [string](#string) | | if empty => create new blocks | + + + + + + + + +### Event.Block.Show + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| block | [Model.Block](#anytype.Model.Block) | | | + + + + + + + + +### Event.Block.Update + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| changes | [BlockChanges](#anytype.BlockChanges) | | | + + + + + + + + +### Event.User + + + + + + + + + +### Event.User.Block + + + + + + + + + +### Event.User.Block.Join +Middleware to front end event message, that will be sent in this scenario: +Precondition: user A opened a block +1. User B opens the same block +2. User A receives a message about p.1 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account | [Event.Account](#anytype.Event.Account) | | Account of the user, that opened a block | + + + + + + + + +### Event.User.Block.Left +Middleware to front end event message, that will be sent in this scenario: +Precondition: user A and user B opened the same block +1. User B closes the block +2. User A receives a message about p.1 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account | [Event.Account](#anytype.Event.Account) | | Account of the user, that left the block | + + + + + + + + +### Event.User.Block.SelectRange +Middleware to front end event message, that will be sent in this scenario: +Precondition: user A and user B opened the same block +1. User B selects some inner blocks +2. User A receives a message about p.1 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account | [Event.Account](#anytype.Event.Account) | | Account of the user, that selected blocks | +| blockIdsArray | [string](#string) | repeated | Ids of selected blocks. | + + + + + + + + +### Event.User.Block.TextRange +Middleware to front end event message, that will be sent in this scenario: +Precondition: user A and user B opened the same block +1. User B sets cursor or selects a text region into a text block +2. User A receives a message about p.1 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account | [Event.Account](#anytype.Event.Account) | | Account of the user, that selected a text | +| blockId | [string](#string) | | Id of the text block, that have a selection | +| range | [Model.Range](#anytype.Model.Range) | | Range of the selection | + + + + + + + + + + + + + + + + +

Top

+ +## models.proto + + + + + +### Model + + + + + + + + + +### Model.Account +Contains basic information about user account + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | User's thread id | +| name | [string](#string) | | User name, that associated with this account | +| avatar | [Model.Account.Avatar](#anytype.Model.Account.Avatar) | | Avatar of a user's account | + + + + + + + + +### Model.Account.Avatar +Avatar of a user's account. It could be an image or color + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| image | [Model.Image](#anytype.Model.Image) | | Image of the avatar. Contains hash and size | +| color | [string](#string) | | Color of the avatar, if no image | + + + + + + + + +### Model.Block + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| header | [Model.Block.Header](#anytype.Model.Block.Header) | | | +| children | [string](#string) | repeated | | +| dashboard | [Model.Block.Content.Dashboard](#anytype.Model.Block.Content.Dashboard) | | | +| page | [Model.Block.Content.Page](#anytype.Model.Block.Content.Page) | | | +| dataview | [Model.Block.Content.Dataview](#anytype.Model.Block.Content.Dataview) | | | +| text | [Model.Block.Content.Text](#anytype.Model.Block.Content.Text) | | | +| media | [Model.Block.Content.Media](#anytype.Model.Block.Content.Media) | | | +| layout | [Model.Block.Content.Layout](#anytype.Model.Block.Content.Layout) | | | +| div | [Model.Block.Content.Div](#anytype.Model.Block.Content.Div) | | | + + + + + + + + +### Model.Block.Content + + + + + + + + + +### Model.Block.Content.Dashboard + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| style | [Model.Block.Content.Dashboard.Style](#anytype.Model.Block.Content.Dashboard.Style) | | | +| headers | [Model.Block.Header](#anytype.Model.Block.Header) | repeated | | + + + + + + + + +### Model.Block.Content.Dataview +... + + + + + + + + +### Model.Block.Content.Div + + + + + + + + + +### Model.Block.Content.Layout + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| style | [Model.Block.Content.Layout.Style](#anytype.Model.Block.Content.Layout.Style) | | | + + + + + + + + +### Model.Block.Content.Media + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| content | [bytes](#bytes) | | | +| state | [Model.Block.Content.Media.State](#anytype.Model.Block.Content.Media.State) | | | +| video | [Model.Block.Content.Media.VideoPreview](#anytype.Model.Block.Content.Media.VideoPreview) | | | +| image | [Model.Block.Content.Media.ImagePreview](#anytype.Model.Block.Content.Media.ImagePreview) | | | +| file | [Model.Block.Content.Media.FilePreview](#anytype.Model.Block.Content.Media.FilePreview) | | | + + + + + + + + +### Model.Block.Content.Media.FilePreview + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | +| icon | [string](#string) | | | + + + + + + + + +### Model.Block.Content.Media.ImagePreview + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| thumbnail | [bytes](#bytes) | | | +| name | [string](#string) | | | +| width | [int32](#int32) | | | + + + + + + + + +### Model.Block.Content.Media.VideoPreview + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| thumbnail | [bytes](#bytes) | | | +| name | [string](#string) | | | +| width | [int32](#int32) | | | + + + + + + + + +### Model.Block.Content.Page + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| style | [Model.Block.Content.Page.Style](#anytype.Model.Block.Content.Page.Style) | | | + + + + + + + + +### Model.Block.Content.Text + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| text | [string](#string) | | | +| style | [Model.Block.Content.Text.Style](#anytype.Model.Block.Content.Text.Style) | | | +| marksList | [Model.Block.Content.Text.Marks](#anytype.Model.Block.Content.Text.Marks) | | | +| toggleable | [bool](#bool) | | | +| markerType | [Model.Block.Content.Text.MarkerType](#anytype.Model.Block.Content.Text.MarkerType) | | | +| checkable | [bool](#bool) | | | +| checked | [bool](#bool) | | | + + + + + + + + +### Model.Block.Content.Text.Mark + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| range | [Model.Range](#anytype.Model.Range) | | | +| type | [Model.Block.Content.Text.Mark.Type](#anytype.Model.Block.Content.Text.Mark.Type) | | | +| param | [string](#string) | | link, color, etc | + + + + + + + + +### Model.Block.Content.Text.Marks + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| marks | [Model.Block.Content.Text.Mark](#anytype.Model.Block.Content.Text.Mark) | repeated | | + + + + + + + + +### Model.Block.Header + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| type | [Model.Block.Header.Type](#anytype.Model.Block.Header.Type) | | | +| fields | [Model.Struct](#anytype.Model.Struct) | | | +| permissions | [Model.Block.Header.Permissions](#anytype.Model.Block.Header.Permissions) | | | + + + + + + + + +### Model.Block.Header.Permissions + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| read | [bool](#bool) | | | +| edit | [bool](#bool) | | | +| remove | [bool](#bool) | | | +| drag | [bool](#bool) | | | +| dropOn | [bool](#bool) | | | + + + + + + + + +### Model.Image + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| sizes | [Model.Image.Size](#anytype.Model.Image.Size) | repeated | | + + + + + + + + +### Model.Preview + + + + + + + + + +### Model.Preview.Link + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| description | [string](#string) | | | +| imageUrl | [string](#string) | | | +| url | [string](#string) | | | +| faviconUrl | [string](#string) | | | +| type | [Model.Preview.Link.Type](#anytype.Model.Preview.Link.Type) | | | + + + + + + + + +### Model.Range + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| from | [int32](#int32) | | | +| to | [int32](#int32) | | | + + + + + + + + +### Model.Struct + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| fields | [Model.Struct.FieldsEntry](#anytype.Model.Struct.FieldsEntry) | repeated | Unordered map of dynamically typed values. | + + + + + + + + +### Model.Struct.FieldsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Model.Struct.Value](#anytype.Model.Struct.Value) | | | + + + + + + + + +### Model.Struct.ListValue +`ListValue` is a wrapper around a repeated field of values. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| values | [Model.Struct.Value](#anytype.Model.Struct.Value) | repeated | | + + + + + + + + +### Model.Struct.Value +`Value` represents a dynamically typed value which can be either +null, a number, a string, a boolean, a recursive struct value, or a +list of values. A producer of value is expected to set one of that +variants, absence of any variant indicates an error. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| null_value | [Model.Struct.NullValue](#anytype.Model.Struct.NullValue) | | Represents a null value. | +| number_value | [double](#double) | | Represents a double value. | +| string_value | [string](#string) | | Represents a string value. | +| bool_value | [bool](#bool) | | Represents a boolean value. | +| struct_value | [Model.Struct](#anytype.Model.Struct) | | Represents a structured value. | +| list_value | [Model.Struct.ListValue](#anytype.Model.Struct.ListValue) | | Represents a repeated `Value`. | + + + + + + + + +### Model.Video + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| sizes | [Model.Video.Size](#anytype.Model.Video.Size) | repeated | | + + + + + + + + + + +### Model.Block.Content.Dashboard.Style + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| MAIN_SCREEN | 0 | ... | + + + + + +### Model.Block.Content.Layout.Style + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| ROW | 0 | | +| COLUMN | 1 | | + + + + + +### Model.Block.Content.Media.State + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| EMPTY | 0 | | +| UPLOADING | 1 | | +| PREVIEW | 2 | | +| DOWNLOADING | 3 | | +| DONE | 4 | | + + + + + +### Model.Block.Content.Page.Style + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| EMPTY | 0 | | +| TASK | 1 | | +| BOOKMARK | 2 | | +| SET | 3 | ... | + + + + + +### Model.Block.Content.Text.Mark.Type + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| STRIKETHROUGH | 0 | | +| KEYBOARD | 1 | | +| ITALIC | 2 | | +| BOLD | 3 | | +| LINK | 4 | | + + + + + +### Model.Block.Content.Text.MarkerType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| none | 0 | | +| number | 1 | | +| bullet | 2 | | + + + + + +### Model.Block.Content.Text.Style + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| p | 0 | | +| h1 | 1 | | +| h2 | 2 | | +| h3 | 3 | | +| h4 | 4 | | +| quote | 5 | | +| code | 6 | | + + + + + +### Model.Block.Header.Type + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| DASHBOARD | 0 | | +| PAGE | 1 | | +| DATAVIEW | 2 | | +| TEXT | 3 | | +| FILE | 4 | | +| PICTURE | 5 | | +| VIDEO | 6 | | +| BOOKMARK | 7 | | +| LAYOUT | 8 | | +| DIV | 9 | | + + + + + +### Model.Image.Size + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| LARGE | 0 | | +| SMALL | 1 | | +| THUMB | 2 | | + + + + + +### Model.Preview.Link.Type + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| PAGE | 0 | | +| IMAGE | 1 | | +| TEXT | 2 | | +| UNEXPECTED | 3 | | + + + + + +### Model.Struct.NullValue +`NullValue` is a singleton enumeration to represent the null value for the + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL_VALUE | 0 | | + + + + + +### Model.Video.Size + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| SD_360p | 0 | | +| SD_480p | 1 | | +| HD_720p | 2 | | +| HD_1080p | 3 | | +| UHD_1440p | 4 | | +| UHD_2160p | 5 | | + + + + + + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ Type | Java Type | Python Type | +| ----------- | ----- | -------- | --------- | ----------- | +| double | | double | double | float | +| float | | float | float | float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | +| sfixed32 | Always four bytes. | int32 | int | int | +| sfixed64 | Always eight bytes. | int64 | long | int/long | +| bool | | bool | boolean | boolean | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | + diff --git a/go.mod b/go.mod index e1108ce43..243952a38 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,24 @@ module github.com/anytypeio/go-anytype-middleware go 1.12 require ( + github.com/Masterminds/goutils v1.1.0 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/PuerkitoBio/goquery v1.5.0 // indirect github.com/anytypeio/go-anytype-library v0.0.0-20191019100520-f545fa654778 github.com/gogo/protobuf v1.3.1 github.com/golang/protobuf v1.3.2 + github.com/huandu/xstrings v1.2.0 // indirect + github.com/imdario/mergo v0.3.8 // indirect github.com/ipfs/go-log v0.0.1 + github.com/lyft/protoc-gen-validate v0.1.0 // indirect github.com/mauidude/go-readability v0.0.0-20141216012317-2f30b1a346f1 github.com/microcosm-cc/bluemonday v1.0.2 + github.com/mitchellh/copystructure v1.0.0 // indirect + github.com/mwitkow/go-proto-validators v0.2.0 // indirect github.com/otiai10/opengraph v1.1.0 + github.com/pseudomuto/protoc-gen-doc v1.3.0 // indirect + github.com/pseudomuto/protokit v0.2.0 // indirect github.com/stretchr/testify v1.3.0 github.com/textileio/go-textile v0.7.2-0.20190907000013-95a885123536 ) diff --git a/go.sum b/go.sum index 17bfa1009..07f951c92 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,12 @@ github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETF github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd/go.mod h1:bqoB8kInrTeEtYAwaIXoSRqdwnjQmFhsfusnzyui6yY= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= github.com/PuerkitoBio/goquery v1.5.0 h1:uGvmFXOA73IKluu/F84Xd1tt/z07GYm8X49XKHP7EJk= @@ -154,6 +160,7 @@ github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJA github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -211,10 +218,14 @@ github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.1 h1:s7KkiBPfxCeDVo47KySjK0ACPc5GJRUxFpdyWEuDjhw= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= @@ -567,6 +578,8 @@ github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQ github.com/lucas-clemente/quic-go v0.11.1/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= github.com/lucas-clemente/quic-go v0.11.2 h1:Mop0ac3zALaBR3wGs6j8OYe/tcFvFsxTUFMkE/7yUOI= github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= +github.com/lyft/protoc-gen-validate v0.1.0 h1:NytKd9K7UW7Szxn+9PYNsaJ/98TL/WsDq4ro4ZVuh5o= +github.com/lyft/protoc-gen-validate v0.1.0/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -602,12 +615,16 @@ github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+ github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.0 h1:U41/2erhAKcmSI14xh/ZTUdBPOzDOIfS93ibzUSl8KM= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= @@ -643,6 +660,8 @@ github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wS github.com/mutecomm/go-sqlcipher v0.0.0-20190227152316-55dbde17881f h1:hd3r+uv9DNLScbOrnlj82rBldHQf3XWmCeXAWbw8euQ= github.com/mutecomm/go-sqlcipher v0.0.0-20190227152316-55dbde17881f/go.mod h1:MyUWrZlB1aI5bs7j9/pJ8ckLLZ4QcCYcNiSbsAW32D4= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.2.0 h1:F6LFfmgVnfULfaRsQWBbe7F7ocuHCr9+7m+GAeDzNbQ= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -692,6 +711,10 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190519111021-9935e8e0588d/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protoc-gen-doc v1.3.0 h1:wpwmaSCWY2lGwkzAxAaqYcGyoklZjZmeXrJ/X7IskJM= +github.com/pseudomuto/protoc-gen-doc v1.3.0/go.mod h1:fwtQAY9erXp3mC92O8OTECnDlJT2r0Ff4KSEKbGEmy0= +github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -918,6 +941,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= diff --git a/lib/lib_test.go b/lib/lib_test.go index a283cc6ee..68376ffd6 100644 --- a/lib/lib_test.go +++ b/lib/lib_test.go @@ -10,24 +10,24 @@ import ( "github.com/stretchr/testify/require" ) -func Test_Unpack(t *testing.T) { - b, _ := proto.Marshal(&pb.WalletRecoverResponse{}) +func TestUnpack(t *testing.T) { + b, _ := proto.Marshal(&pb.RpcWalletRecoverResponse{}) - var msg pb.WalletRecoverResponse + var msg pb.RpcWalletRecoverResponse err := proto.Unmarshal(b, &msg) if err != nil { fmt.Println(err.Error()) } } -func Test_EventHandler(t *testing.T) { +func TestEventHandler(t *testing.T) { var eventReceived *pb.Event mw = &core.Middleware{} SetEventHandler(func(event *pb.Event) { eventReceived = event }) - eventSent := &pb.Event{Message: &pb.Event_AccountShow{AccountShow: &pb.AccountShow{Index: 0, Account: &pb.Account{Id: "1", Name: "name"}}}} + eventSent := &pb.Event{Message: &pb.EventMessageOfAccountShow{AccountShow: &pb.EventAccountShow{Index: 0, Account: &pb.ModelAccount{Id: "1", Name: "name"}}}} mw.SendEvent(eventSent) require.Equal(t, eventSent, eventReceived, "eventReceived not equal to eventSent: %s %s", eventSent, eventReceived) diff --git a/lib/service.pb.go b/lib/service.pb.go index 13a182f25..aa72bcadf 100644 --- a/lib/service.pb.go +++ b/lib/service.pb.go @@ -24,31 +24,32 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) } var fileDescriptor_a0b84a42fa06f626 = []byte{ - // 369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x4b, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0x55, 0x21, 0x51, 0xe1, 0x3e, 0x24, 0xbc, 0x01, 0xd2, 0x36, 0xdc, 0xa0, 0x0b, 0xd8, - 0xb2, 0x21, 0x15, 0x2a, 0xa8, 0x15, 0x8f, 0x56, 0x80, 0xc4, 0x2e, 0x71, 0x87, 0xca, 0xaa, 0x63, - 0x87, 0xd8, 0x2d, 0xea, 0x3d, 0x38, 0x14, 0x4b, 0x8e, 0x80, 0x7a, 0x12, 0x44, 0x6d, 0xe7, 0x9d, - 0x9d, 0xf3, 0x7f, 0x33, 0x5f, 0x32, 0x9a, 0x18, 0x75, 0x24, 0xc4, 0x1b, 0x4a, 0x60, 0x18, 0xc5, - 0x42, 0x09, 0xdc, 0xf4, 0xf9, 0x56, 0x6d, 0x23, 0x70, 0x3a, 0x3e, 0x21, 0x62, 0xcd, 0x95, 0xce, - 0x1d, 0xf4, 0x4e, 0x19, 0xd8, 0x73, 0x48, 0x25, 0x31, 0xe7, 0x56, 0xc0, 0x04, 0x59, 0xe9, 0x87, - 0x8b, 0xaf, 0x26, 0xea, 0x8e, 0x18, 0x05, 0xae, 0x46, 0x22, 0x0c, 0x7d, 0xbe, 0x90, 0x78, 0x82, - 0xda, 0xaf, 0x3e, 0x63, 0xa0, 0x46, 0x31, 0xf8, 0x0a, 0x70, 0x7f, 0x68, 0x5e, 0x30, 0xcc, 0xc6, - 0x33, 0xf8, 0x58, 0x83, 0x54, 0xce, 0xa0, 0x86, 0xca, 0x48, 0x70, 0x09, 0xf8, 0x1e, 0x75, 0x74, - 0x3e, 0x03, 0x22, 0x36, 0x10, 0xe3, 0x62, 0xbd, 0xc9, 0xad, 0xce, 0xad, 0xc3, 0xc6, 0xf7, 0x84, - 0xba, 0xd7, 0x7a, 0x4a, 0x2b, 0x4c, 0x3b, 0xf2, 0xc0, 0x1a, 0xcf, 0x6b, 0x79, 0xfa, 0x89, 0x86, - 0x98, 0x81, 0x07, 0xc5, 0x8e, 0xfc, 0xc4, 0x6e, 0x1d, 0x2e, 0xf9, 0xe6, 0xc0, 0x80, 0xa8, 0xb2, - 0x4f, 0xe7, 0xb5, 0x3e, 0x8b, 0x8d, 0x6f, 0x82, 0xda, 0x77, 0xa1, 0xbf, 0x84, 0x31, 0x28, 0x8f, - 0x89, 0x20, 0xb3, 0x8f, 0x6c, 0x5c, 0xde, 0x47, 0x9e, 0x1a, 0xd9, 0x0d, 0x42, 0x2f, 0x10, 0x4b, - 0x2a, 0xf8, 0x18, 0x14, 0x76, 0x92, 0xe2, 0x34, 0xb4, 0xa2, 0x5e, 0x25, 0x33, 0x9a, 0x2b, 0xd4, - 0x9c, 0x8a, 0xe5, 0x1c, 0xf8, 0x02, 0x9f, 0x24, 0x75, 0x26, 0xb1, 0x82, 0xd3, 0x32, 0x30, 0xdd, - 0x1e, 0x3a, 0xf2, 0xfe, 0xff, 0xc1, 0x87, 0x08, 0x38, 0x3e, 0x4b, 0xca, 0x92, 0xcc, 0x1a, 0x9c, - 0x2a, 0x64, 0x1c, 0xb7, 0xa8, 0xb5, 0x0f, 0xcd, 0xce, 0x7a, 0xf9, 0xd2, 0xfc, 0xc6, 0xfa, 0xd5, - 0xb0, 0x60, 0x7a, 0x8e, 0x16, 0x15, 0x26, 0x9d, 0xd6, 0x98, 0x2c, 0x4c, 0x4d, 0x53, 0xca, 0x57, - 0x8f, 0x31, 0x6c, 0x28, 0x7c, 0x66, 0x4c, 0x99, 0xb4, 0x6c, 0xca, 0x41, 0x6d, 0xf2, 0x8e, 0xbf, - 0x77, 0x6e, 0xe3, 0x67, 0xe7, 0x36, 0x7e, 0x77, 0x6e, 0xe3, 0xed, 0x80, 0xd1, 0x20, 0x38, 0xdc, - 0x5f, 0xd8, 0xcb, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x82, 0x8a, 0xe6, 0xfe, 0x03, 0x00, - 0x00, + // 396 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x4e, 0xf2, 0x40, + 0x18, 0x87, 0x21, 0x5f, 0xf2, 0xa1, 0x23, 0x10, 0x33, 0x4b, 0x12, 0x2a, 0xff, 0x8c, 0xae, 0x66, + 0xa1, 0x27, 0x10, 0x16, 0x60, 0x82, 0x1a, 0x41, 0x25, 0x92, 0xb8, 0x28, 0xc3, 0x1b, 0xd2, 0x58, + 0x66, 0x6a, 0x3b, 0x90, 0x70, 0x0b, 0x6f, 0xe3, 0x15, 0x5c, 0xb2, 0x74, 0x69, 0xe0, 0x22, 0xa6, + 0xed, 0xeb, 0x98, 0x96, 0xb6, 0x6c, 0xe7, 0x79, 0x7e, 0x4f, 0xc9, 0x4c, 0x02, 0x29, 0x79, 0xe0, + 0x2e, 0x2d, 0x0e, 0xcc, 0x71, 0xa5, 0x92, 0xb4, 0x60, 0x8a, 0x95, 0x5a, 0x39, 0x50, 0x29, 0x73, + 0x39, 0x9f, 0x9b, 0x62, 0xea, 0x85, 0xe0, 0xe2, 0xe3, 0x80, 0x94, 0x3b, 0xb6, 0x05, 0x42, 0x75, + 0x10, 0xd0, 0x11, 0x29, 0x8e, 0x4c, 0xdb, 0x06, 0xd5, 0x71, 0xc1, 0x54, 0x40, 0x1b, 0x0c, 0xc7, + 0x6c, 0xe0, 0x70, 0x16, 0x22, 0x16, 0x32, 0x36, 0x80, 0xb7, 0x05, 0x78, 0xaa, 0xd2, 0xcc, 0x74, + 0x3c, 0x47, 0x0a, 0x0f, 0xe8, 0x98, 0x94, 0x42, 0x32, 0x00, 0x2e, 0x97, 0xe0, 0xd2, 0xc4, 0x15, + 0x42, 0x9d, 0x6e, 0x65, 0x4b, 0xd8, 0x7e, 0x21, 0xe5, 0x2b, 0xce, 0xe5, 0x42, 0xe8, 0x78, 0x74, + 0x87, 0x70, 0xa7, 0x7e, 0xba, 0xc7, 0xfa, 0xfb, 0xe9, 0xc8, 0xf0, 0x52, 0x9a, 0x89, 0xbb, 0xd8, + 0xad, 0xb4, 0xb2, 0xa5, 0x9d, 0xf6, 0x10, 0x6c, 0xe0, 0x2a, 0xa5, 0x1d, 0xc2, 0x3d, 0x6d, 0x2d, + 0x61, 0xfb, 0x99, 0x14, 0xaf, 0xe7, 0xe6, 0x0c, 0xba, 0xa0, 0xda, 0xb6, 0x9c, 0xc4, 0xd2, 0x01, + 0x62, 0x5d, 0x50, 0xcc, 0x87, 0x29, 0xe9, 0x1d, 0x09, 0xd3, 0xf7, 0x84, 0x3c, 0x81, 0xeb, 0x59, + 0x52, 0x74, 0x41, 0xd1, 0x5a, 0x64, 0x83, 0x20, 0x58, 0xfd, 0x56, 0xeb, 0x19, 0x06, 0x26, 0x7b, + 0xa4, 0xd0, 0x97, 0xb3, 0x21, 0x88, 0x29, 0xad, 0x46, 0xec, 0xbe, 0x9c, 0x31, 0xff, 0x58, 0xc7, + 0x8c, 0x34, 0x8c, 0xa5, 0x5b, 0x72, 0xd8, 0xb6, 0x25, 0x7f, 0xbd, 0x73, 0x40, 0xd0, 0x93, 0x88, + 0x1c, 0x9c, 0x33, 0x1f, 0xe8, 0x5a, 0x2d, 0x5d, 0xc0, 0xde, 0x03, 0x39, 0x0a, 0x8e, 0xf1, 0xf5, + 0xeb, 0x09, 0x83, 0xd8, 0xdb, 0x37, 0xb2, 0x94, 0x58, 0xf5, 0xd1, 0x99, 0xa6, 0x55, 0x43, 0x94, + 0x59, 0xd5, 0x0a, 0x56, 0x81, 0x1c, 0x07, 0xa0, 0x67, 0x79, 0x4a, 0xba, 0xab, 0x1b, 0xb9, 0x04, + 0x7a, 0x96, 0xb0, 0x43, 0xce, 0x7c, 0x41, 0x7f, 0xe0, 0x7c, 0xbf, 0x18, 0x7e, 0xa6, 0x5d, 0xfd, + 0xdc, 0x18, 0xf9, 0xf5, 0xc6, 0xc8, 0x7f, 0x6f, 0x8c, 0xfc, 0xfb, 0xd6, 0xc8, 0xad, 0xb7, 0x46, + 0xee, 0x6b, 0x6b, 0xe4, 0xc6, 0xff, 0x6c, 0x6b, 0x32, 0xf9, 0x1f, 0xfc, 0xbf, 0x5c, 0xfe, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xfc, 0x61, 0x96, 0x16, 0x89, 0x04, 0x00, 0x00, } // This is a compile-time assertion to ensure that this generated file @@ -58,18 +59,18 @@ var fileDescriptor_a0b84a42fa06f626 = []byte{ var clientCommandsHandler ClientCommandsHandler type ClientCommandsHandler interface { - WalletCreate(*pb.WalletCreateRequest) *pb.WalletCreateResponse - WalletRecover(*pb.WalletRecoverRequest) *pb.WalletRecoverResponse - AccountRecover(*pb.AccountRecoverRequest) *pb.AccountRecoverResponse - AccountCreate(*pb.AccountCreateRequest) *pb.AccountCreateResponse - AccountSelect(*pb.AccountSelectRequest) *pb.AccountSelectResponse - ImageGetBlob(*pb.ImageGetBlobRequest) *pb.ImageGetBlobResponse - VersionGet(*pb.VersionGetRequest) *pb.VersionGetResponse - LogSend(*pb.LogSendRequest) *pb.LogSendResponse - BlockOpen(*pb.BlockOpenRequest) *pb.BlockOpenResponse - BlockCreate(*pb.BlockCreateRequest) *pb.BlockCreateResponse - BlockUpdate(*pb.BlockUpdateRequest) *pb.BlockUpdateResponse - LinkPreview(*pb.LinkPreviewRequest) *pb.LinkPreviewResponse + WalletCreate(*pb.RpcWalletCreateRequest) *pb.RpcWalletCreateResponse + WalletRecover(*pb.RpcWalletRecoverRequest) *pb.RpcWalletRecoverResponse + AccountRecover(*pb.RpcAccountRecoverRequest) *pb.RpcAccountRecoverResponse + AccountCreate(*pb.RpcAccountCreateRequest) *pb.RpcAccountCreateResponse + AccountSelect(*pb.RpcAccountSelectRequest) *pb.RpcAccountSelectResponse + ImageGetBlob(*pb.RpcImageGetBlobRequest) *pb.RpcImageGetBlobResponse + VersionGet(*pb.RpcVersionGetRequest) *pb.RpcVersionGetResponse + LogSend(*pb.RpcLogSendRequest) *pb.RpcLogSendResponse + BlockOpen(*pb.RpcBlockOpenRequest) *pb.RpcBlockOpenResponse + BlockCreate(*pb.RpcBlockCreateRequest) *pb.RpcBlockCreateResponse + BlockUpdate(*pb.RpcBlockUpdateRequest) *pb.RpcBlockUpdateResponse + BlockHistoryMove(*pb.RpcBlockHistoryMoveRequest) *pb.RpcBlockHistoryMoveResponse } func registerClientCommandsHandler(srv ClientCommandsHandler) { @@ -77,9 +78,9 @@ func registerClientCommandsHandler(srv ClientCommandsHandler) { } func WalletCreate(b []byte) []byte { - in := new(pb.WalletCreateRequest) + in := new(pb.RpcWalletCreateRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.WalletCreateResponse{Error: &pb.WalletCreateResponse_Error{Code: pb.WalletCreateResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcWalletCreateResponse{Error: &pb.RpcWalletCreateResponseError{Code: pb.RpcWalletCreateResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.WalletCreate(in).Marshal() @@ -87,9 +88,9 @@ func WalletCreate(b []byte) []byte { } func WalletRecover(b []byte) []byte { - in := new(pb.WalletRecoverRequest) + in := new(pb.RpcWalletRecoverRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.WalletRecoverResponse{Error: &pb.WalletRecoverResponse_Error{Code: pb.WalletRecoverResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcWalletRecoverResponse{Error: &pb.RpcWalletRecoverResponseError{Code: pb.RpcWalletRecoverResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.WalletRecover(in).Marshal() @@ -97,9 +98,9 @@ func WalletRecover(b []byte) []byte { } func AccountRecover(b []byte) []byte { - in := new(pb.AccountRecoverRequest) + in := new(pb.RpcAccountRecoverRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.AccountRecoverResponse{Error: &pb.AccountRecoverResponse_Error{Code: pb.AccountRecoverResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcAccountRecoverResponse{Error: &pb.RpcAccountRecoverResponseError{Code: pb.RpcAccountRecoverResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.AccountRecover(in).Marshal() @@ -107,9 +108,9 @@ func AccountRecover(b []byte) []byte { } func AccountCreate(b []byte) []byte { - in := new(pb.AccountCreateRequest) + in := new(pb.RpcAccountCreateRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.AccountCreateResponse{Error: &pb.AccountCreateResponse_Error{Code: pb.AccountCreateResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcAccountCreateResponse{Error: &pb.RpcAccountCreateResponseError{Code: pb.RpcAccountCreateResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.AccountCreate(in).Marshal() @@ -117,9 +118,9 @@ func AccountCreate(b []byte) []byte { } func AccountSelect(b []byte) []byte { - in := new(pb.AccountSelectRequest) + in := new(pb.RpcAccountSelectRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.AccountSelectResponse{Error: &pb.AccountSelectResponse_Error{Code: pb.AccountSelectResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcAccountSelectResponse{Error: &pb.RpcAccountSelectResponseError{Code: pb.RpcAccountSelectResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.AccountSelect(in).Marshal() @@ -127,9 +128,9 @@ func AccountSelect(b []byte) []byte { } func ImageGetBlob(b []byte) []byte { - in := new(pb.ImageGetBlobRequest) + in := new(pb.RpcImageGetBlobRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.ImageGetBlobResponse{Error: &pb.ImageGetBlobResponse_Error{Code: pb.ImageGetBlobResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcImageGetBlobResponse{Error: &pb.RpcImageGetBlobResponseError{Code: pb.RpcImageGetBlobResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.ImageGetBlob(in).Marshal() @@ -137,9 +138,9 @@ func ImageGetBlob(b []byte) []byte { } func VersionGet(b []byte) []byte { - in := new(pb.VersionGetRequest) + in := new(pb.RpcVersionGetRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.VersionGetResponse{Error: &pb.VersionGetResponse_Error{Code: pb.VersionGetResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcVersionGetResponse{Error: &pb.RpcVersionGetResponseError{Code: pb.RpcVersionGetResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.VersionGet(in).Marshal() @@ -147,9 +148,9 @@ func VersionGet(b []byte) []byte { } func LogSend(b []byte) []byte { - in := new(pb.LogSendRequest) + in := new(pb.RpcLogSendRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.LogSendResponse{Error: &pb.LogSendResponse_Error{Code: pb.LogSendResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcLogSendResponse{Error: &pb.RpcLogSendResponseError{Code: pb.RpcLogSendResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.LogSend(in).Marshal() @@ -157,9 +158,9 @@ func LogSend(b []byte) []byte { } func BlockOpen(b []byte) []byte { - in := new(pb.BlockOpenRequest) + in := new(pb.RpcBlockOpenRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.BlockOpenResponse{Error: &pb.BlockOpenResponse_Error{Code: pb.BlockOpenResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcBlockOpenResponse{Error: &pb.RpcBlockOpenResponseError{Code: pb.RpcBlockOpenResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.BlockOpen(in).Marshal() @@ -167,9 +168,9 @@ func BlockOpen(b []byte) []byte { } func BlockCreate(b []byte) []byte { - in := new(pb.BlockCreateRequest) + in := new(pb.RpcBlockCreateRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.BlockCreateResponse{Error: &pb.BlockCreateResponse_Error{Code: pb.BlockCreateResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcBlockCreateResponse{Error: &pb.RpcBlockCreateResponseError{Code: pb.RpcBlockCreateResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.BlockCreate(in).Marshal() @@ -177,22 +178,22 @@ func BlockCreate(b []byte) []byte { } func BlockUpdate(b []byte) []byte { - in := new(pb.BlockUpdateRequest) + in := new(pb.RpcBlockUpdateRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.BlockUpdateResponse{Error: &pb.BlockUpdateResponse_Error{Code: pb.BlockUpdateResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcBlockUpdateResponse{Error: &pb.RpcBlockUpdateResponseError{Code: pb.RpcBlockUpdateResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } resp, _ := clientCommandsHandler.BlockUpdate(in).Marshal() return resp } -func LinkPreview(b []byte) []byte { - in := new(pb.LinkPreviewRequest) +func BlockHistoryMove(b []byte) []byte { + in := new(pb.RpcBlockHistoryMoveRequest) if err := in.Unmarshal(b); err != nil { - resp, _ := (&pb.LinkPreviewResponse{Error: &pb.LinkPreviewResponse_Error{Code: pb.LinkPreviewResponse_Error_BAD_INPUT, Description: err.Error()}}).Marshal() + resp, _ := (&pb.RpcBlockHistoryMoveResponse{Error: &pb.RpcBlockHistoryMoveResponseError{Code: pb.RpcBlockHistoryMoveResponseError_BAD_INPUT, Description: err.Error()}}).Marshal() return resp } - resp, _ := clientCommandsHandler.LinkPreview(in).Marshal() + resp, _ := clientCommandsHandler.BlockHistoryMove(in).Marshal() return resp } @@ -222,8 +223,8 @@ func CommandAsync(cmd string, data []byte, callback func(data []byte)) { cd = BlockCreate(data) case "BlockUpdate": cd = BlockUpdate(data) - case "LinkPreview": - cd = LinkPreview(data) + case "BlockHistoryMove": + cd = BlockHistoryMove(data) default: log.Errorf("unknown command type: %s\n", cmd) } diff --git a/pb/account.pb.go b/pb/account.pb.go deleted file mode 100644 index 8df88674f..000000000 --- a/pb/account.pb.go +++ /dev/null @@ -1,5067 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: account.proto - -package pb - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type WalletCreateResponse_Error_Code int32 - -const ( - WalletCreateResponse_Error_NULL WalletCreateResponse_Error_Code = 0 - WalletCreateResponse_Error_UNKNOWN_ERROR WalletCreateResponse_Error_Code = 1 - WalletCreateResponse_Error_BAD_INPUT WalletCreateResponse_Error_Code = 2 - WalletCreateResponse_Error_FAILED_TO_CREATE_LOCAL_REPO WalletCreateResponse_Error_Code = 101 -) - -var WalletCreateResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "FAILED_TO_CREATE_LOCAL_REPO", -} - -var WalletCreateResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "FAILED_TO_CREATE_LOCAL_REPO": 101, -} - -func (x WalletCreateResponse_Error_Code) String() string { - return proto.EnumName(WalletCreateResponse_Error_Code_name, int32(x)) -} - -func (WalletCreateResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{3, 0, 0} -} - -type WalletRecoverResponse_Error_Code int32 - -const ( - WalletRecoverResponse_Error_NULL WalletRecoverResponse_Error_Code = 0 - WalletRecoverResponse_Error_UNKNOWN_ERROR WalletRecoverResponse_Error_Code = 1 - WalletRecoverResponse_Error_BAD_INPUT WalletRecoverResponse_Error_Code = 2 - WalletRecoverResponse_Error_FAILED_TO_CREATE_LOCAL_REPO WalletRecoverResponse_Error_Code = 101 -) - -var WalletRecoverResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "FAILED_TO_CREATE_LOCAL_REPO", -} - -var WalletRecoverResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "FAILED_TO_CREATE_LOCAL_REPO": 101, -} - -func (x WalletRecoverResponse_Error_Code) String() string { - return proto.EnumName(WalletRecoverResponse_Error_Code_name, int32(x)) -} - -func (WalletRecoverResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{5, 0, 0} -} - -type AccountCreateResponse_Error_Code int32 - -const ( - AccountCreateResponse_Error_NULL AccountCreateResponse_Error_Code = 0 - AccountCreateResponse_Error_UNKNOWN_ERROR AccountCreateResponse_Error_Code = 1 - AccountCreateResponse_Error_BAD_INPUT AccountCreateResponse_Error_Code = 2 - AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE AccountCreateResponse_Error_Code = 101 - AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME AccountCreateResponse_Error_Code = 102 - AccountCreateResponse_Error_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR AccountCreateResponse_Error_Code = 103 -) - -var AccountCreateResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE", - 102: "ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME", - 103: "ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR", -} - -var AccountCreateResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE": 101, - "ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME": 102, - "ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR": 103, -} - -func (x AccountCreateResponse_Error_Code) String() string { - return proto.EnumName(AccountCreateResponse_Error_Code_name, int32(x)) -} - -func (AccountCreateResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{7, 0, 0} -} - -type AccountRecoverResponse_Error_Code int32 - -const ( - AccountRecoverResponse_Error_NULL AccountRecoverResponse_Error_Code = 0 - AccountRecoverResponse_Error_UNKNOWN_ERROR AccountRecoverResponse_Error_Code = 1 - AccountRecoverResponse_Error_BAD_INPUT AccountRecoverResponse_Error_Code = 2 - // ... - AccountRecoverResponse_Error_NO_ACCOUNTS_FOUND AccountRecoverResponse_Error_Code = 101 - AccountRecoverResponse_Error_NEED_TO_RECOVER_WALLET_FIRST AccountRecoverResponse_Error_Code = 102 - AccountRecoverResponse_Error_FAILED_TO_CREATE_LOCAL_REPO AccountRecoverResponse_Error_Code = 103 - AccountRecoverResponse_Error_LOCAL_REPO_EXISTS_BUT_CORRUPTED AccountRecoverResponse_Error_Code = 104 - AccountRecoverResponse_Error_FAILED_TO_RUN_NODE AccountRecoverResponse_Error_Code = 105 -) - -var AccountRecoverResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "NO_ACCOUNTS_FOUND", - 102: "NEED_TO_RECOVER_WALLET_FIRST", - 103: "FAILED_TO_CREATE_LOCAL_REPO", - 104: "LOCAL_REPO_EXISTS_BUT_CORRUPTED", - 105: "FAILED_TO_RUN_NODE", -} - -var AccountRecoverResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "NO_ACCOUNTS_FOUND": 101, - "NEED_TO_RECOVER_WALLET_FIRST": 102, - "FAILED_TO_CREATE_LOCAL_REPO": 103, - "LOCAL_REPO_EXISTS_BUT_CORRUPTED": 104, - "FAILED_TO_RUN_NODE": 105, -} - -func (x AccountRecoverResponse_Error_Code) String() string { - return proto.EnumName(AccountRecoverResponse_Error_Code_name, int32(x)) -} - -func (AccountRecoverResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{9, 0, 0} -} - -type AccountSelectResponse_Error_Code int32 - -const ( - AccountSelectResponse_Error_NULL AccountSelectResponse_Error_Code = 0 - AccountSelectResponse_Error_UNKNOWN_ERROR AccountSelectResponse_Error_Code = 1 - AccountSelectResponse_Error_BAD_INPUT AccountSelectResponse_Error_Code = 2 - AccountSelectResponse_Error_FAILED_TO_CREATE_LOCAL_REPO AccountSelectResponse_Error_Code = 101 - AccountSelectResponse_Error_LOCAL_REPO_EXISTS_BUT_CORRUPTED AccountSelectResponse_Error_Code = 102 - AccountSelectResponse_Error_FAILED_TO_RUN_NODE AccountSelectResponse_Error_Code = 103 - AccountSelectResponse_Error_FAILED_TO_FIND_ACCOUNT_INFO AccountSelectResponse_Error_Code = 104 - AccountSelectResponse_Error_LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET AccountSelectResponse_Error_Code = 105 -) - -var AccountSelectResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "FAILED_TO_CREATE_LOCAL_REPO", - 102: "LOCAL_REPO_EXISTS_BUT_CORRUPTED", - 103: "FAILED_TO_RUN_NODE", - 104: "FAILED_TO_FIND_ACCOUNT_INFO", - 105: "LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET", -} - -var AccountSelectResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "FAILED_TO_CREATE_LOCAL_REPO": 101, - "LOCAL_REPO_EXISTS_BUT_CORRUPTED": 102, - "FAILED_TO_RUN_NODE": 103, - "FAILED_TO_FIND_ACCOUNT_INFO": 104, - "LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET": 105, -} - -func (x AccountSelectResponse_Error_Code) String() string { - return proto.EnumName(AccountSelectResponse_Error_Code_name, int32(x)) -} - -func (AccountSelectResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{11, 0, 0} -} - -type AccountStartResponse_Error_Code int32 - -const ( - AccountStartResponse_Error_NULL AccountStartResponse_Error_Code = 0 - AccountStartResponse_Error_UNKNOWN_ERROR AccountStartResponse_Error_Code = 1 - AccountStartResponse_Error_BAD_INPUT AccountStartResponse_Error_Code = 2 - AccountStartResponse_Error_LOCAL_REPO_DOESNT_EXIST AccountStartResponse_Error_Code = 101 - AccountStartResponse_Error_LOCAL_REPO_EXISTS_BUT_CORRUPTED AccountStartResponse_Error_Code = 102 - AccountStartResponse_Error_FAILED_TO_RUN_NODE AccountStartResponse_Error_Code = 103 - AccountStartResponse_Error_FAILED_TO_FIND_ACCOUNT_INFO AccountStartResponse_Error_Code = 104 -) - -var AccountStartResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "LOCAL_REPO_DOESNT_EXIST", - 102: "LOCAL_REPO_EXISTS_BUT_CORRUPTED", - 103: "FAILED_TO_RUN_NODE", - 104: "FAILED_TO_FIND_ACCOUNT_INFO", -} - -var AccountStartResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "LOCAL_REPO_DOESNT_EXIST": 101, - "LOCAL_REPO_EXISTS_BUT_CORRUPTED": 102, - "FAILED_TO_RUN_NODE": 103, - "FAILED_TO_FIND_ACCOUNT_INFO": 104, -} - -func (x AccountStartResponse_Error_Code) String() string { - return proto.EnumName(AccountStartResponse_Error_Code_name, int32(x)) -} - -func (AccountStartResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{13, 0, 0} -} - -type Avatar struct { - // Types that are valid to be assigned to Avatar: - // *Avatar_Image - // *Avatar_Color - Avatar isAvatar_Avatar `protobuf_oneof:"avatar"` -} - -func (m *Avatar) Reset() { *m = Avatar{} } -func (m *Avatar) String() string { return proto.CompactTextString(m) } -func (*Avatar) ProtoMessage() {} -func (*Avatar) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{0} -} -func (m *Avatar) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Avatar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Avatar.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Avatar) XXX_Merge(src proto.Message) { - xxx_messageInfo_Avatar.Merge(m, src) -} -func (m *Avatar) XXX_Size() int { - return m.Size() -} -func (m *Avatar) XXX_DiscardUnknown() { - xxx_messageInfo_Avatar.DiscardUnknown(m) -} - -var xxx_messageInfo_Avatar proto.InternalMessageInfo - -type isAvatar_Avatar interface { - isAvatar_Avatar() - MarshalTo([]byte) (int, error) - Size() int -} - -type Avatar_Image struct { - Image *Image `protobuf:"bytes,1,opt,name=image,proto3,oneof" json:"image,omitempty"` -} -type Avatar_Color struct { - Color string `protobuf:"bytes,2,opt,name=color,proto3,oneof" json:"color,omitempty"` -} - -func (*Avatar_Image) isAvatar_Avatar() {} -func (*Avatar_Color) isAvatar_Avatar() {} - -func (m *Avatar) GetAvatar() isAvatar_Avatar { - if m != nil { - return m.Avatar - } - return nil -} - -func (m *Avatar) GetImage() *Image { - if x, ok := m.GetAvatar().(*Avatar_Image); ok { - return x.Image - } - return nil -} - -func (m *Avatar) GetColor() string { - if x, ok := m.GetAvatar().(*Avatar_Color); ok { - return x.Color - } - return "" -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Avatar) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Avatar_Image)(nil), - (*Avatar_Color)(nil), - } -} - -type Account struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Avatar *Avatar `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` -} - -func (m *Account) Reset() { *m = Account{} } -func (m *Account) String() string { return proto.CompactTextString(m) } -func (*Account) ProtoMessage() {} -func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{1} -} -func (m *Account) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Account.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Account) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account.Merge(m, src) -} -func (m *Account) XXX_Size() int { - return m.Size() -} -func (m *Account) XXX_DiscardUnknown() { - xxx_messageInfo_Account.DiscardUnknown(m) -} - -var xxx_messageInfo_Account proto.InternalMessageInfo - -func (m *Account) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Account) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Account) GetAvatar() *Avatar { - if m != nil { - return m.Avatar - } - return nil -} - -type WalletCreateRequest struct { - RootPath string `protobuf:"bytes,1,opt,name=rootPath,proto3" json:"rootPath,omitempty"` -} - -func (m *WalletCreateRequest) Reset() { *m = WalletCreateRequest{} } -func (m *WalletCreateRequest) String() string { return proto.CompactTextString(m) } -func (*WalletCreateRequest) ProtoMessage() {} -func (*WalletCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{2} -} -func (m *WalletCreateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletCreateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WalletCreateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletCreateRequest.Merge(m, src) -} -func (m *WalletCreateRequest) XXX_Size() int { - return m.Size() -} -func (m *WalletCreateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WalletCreateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletCreateRequest proto.InternalMessageInfo - -func (m *WalletCreateRequest) GetRootPath() string { - if m != nil { - return m.RootPath - } - return "" -} - -type WalletCreateResponse struct { - Error *WalletCreateResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` -} - -func (m *WalletCreateResponse) Reset() { *m = WalletCreateResponse{} } -func (m *WalletCreateResponse) String() string { return proto.CompactTextString(m) } -func (*WalletCreateResponse) ProtoMessage() {} -func (*WalletCreateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{3} -} -func (m *WalletCreateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletCreateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WalletCreateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletCreateResponse.Merge(m, src) -} -func (m *WalletCreateResponse) XXX_Size() int { - return m.Size() -} -func (m *WalletCreateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WalletCreateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletCreateResponse proto.InternalMessageInfo - -func (m *WalletCreateResponse) GetError() *WalletCreateResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *WalletCreateResponse) GetMnemonic() string { - if m != nil { - return m.Mnemonic - } - return "" -} - -type WalletCreateResponse_Error struct { - Code WalletCreateResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.WalletCreateResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *WalletCreateResponse_Error) Reset() { *m = WalletCreateResponse_Error{} } -func (m *WalletCreateResponse_Error) String() string { return proto.CompactTextString(m) } -func (*WalletCreateResponse_Error) ProtoMessage() {} -func (*WalletCreateResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{3, 0} -} -func (m *WalletCreateResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletCreateResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletCreateResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WalletCreateResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletCreateResponse_Error.Merge(m, src) -} -func (m *WalletCreateResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *WalletCreateResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_WalletCreateResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletCreateResponse_Error proto.InternalMessageInfo - -func (m *WalletCreateResponse_Error) GetCode() WalletCreateResponse_Error_Code { - if m != nil { - return m.Code - } - return WalletCreateResponse_Error_NULL -} - -func (m *WalletCreateResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type WalletRecoverRequest struct { - RootPath string `protobuf:"bytes,1,opt,name=rootPath,proto3" json:"rootPath,omitempty"` - Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` -} - -func (m *WalletRecoverRequest) Reset() { *m = WalletRecoverRequest{} } -func (m *WalletRecoverRequest) String() string { return proto.CompactTextString(m) } -func (*WalletRecoverRequest) ProtoMessage() {} -func (*WalletRecoverRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{4} -} -func (m *WalletRecoverRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletRecoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletRecoverRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WalletRecoverRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletRecoverRequest.Merge(m, src) -} -func (m *WalletRecoverRequest) XXX_Size() int { - return m.Size() -} -func (m *WalletRecoverRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WalletRecoverRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletRecoverRequest proto.InternalMessageInfo - -func (m *WalletRecoverRequest) GetRootPath() string { - if m != nil { - return m.RootPath - } - return "" -} - -func (m *WalletRecoverRequest) GetMnemonic() string { - if m != nil { - return m.Mnemonic - } - return "" -} - -type WalletRecoverResponse struct { - Error *WalletRecoverResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *WalletRecoverResponse) Reset() { *m = WalletRecoverResponse{} } -func (m *WalletRecoverResponse) String() string { return proto.CompactTextString(m) } -func (*WalletRecoverResponse) ProtoMessage() {} -func (*WalletRecoverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{5} -} -func (m *WalletRecoverResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletRecoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletRecoverResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WalletRecoverResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletRecoverResponse.Merge(m, src) -} -func (m *WalletRecoverResponse) XXX_Size() int { - return m.Size() -} -func (m *WalletRecoverResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WalletRecoverResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletRecoverResponse proto.InternalMessageInfo - -func (m *WalletRecoverResponse) GetError() *WalletRecoverResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -type WalletRecoverResponse_Error struct { - Code WalletRecoverResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.WalletRecoverResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *WalletRecoverResponse_Error) Reset() { *m = WalletRecoverResponse_Error{} } -func (m *WalletRecoverResponse_Error) String() string { return proto.CompactTextString(m) } -func (*WalletRecoverResponse_Error) ProtoMessage() {} -func (*WalletRecoverResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{5, 0} -} -func (m *WalletRecoverResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletRecoverResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletRecoverResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WalletRecoverResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletRecoverResponse_Error.Merge(m, src) -} -func (m *WalletRecoverResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *WalletRecoverResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_WalletRecoverResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletRecoverResponse_Error proto.InternalMessageInfo - -func (m *WalletRecoverResponse_Error) GetCode() WalletRecoverResponse_Error_Code { - if m != nil { - return m.Code - } - return WalletRecoverResponse_Error_NULL -} - -func (m *WalletRecoverResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type AccountCreateRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are valid to be assigned to Avatar: - // *AccountCreateRequest_AvatarLocalPath - // *AccountCreateRequest_AvatarColor - Avatar isAccountCreateRequest_Avatar `protobuf_oneof:"avatar"` -} - -func (m *AccountCreateRequest) Reset() { *m = AccountCreateRequest{} } -func (m *AccountCreateRequest) String() string { return proto.CompactTextString(m) } -func (*AccountCreateRequest) ProtoMessage() {} -func (*AccountCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{6} -} -func (m *AccountCreateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountCreateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountCreateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountCreateRequest.Merge(m, src) -} -func (m *AccountCreateRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountCreateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountCreateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountCreateRequest proto.InternalMessageInfo - -type isAccountCreateRequest_Avatar interface { - isAccountCreateRequest_Avatar() - MarshalTo([]byte) (int, error) - Size() int -} - -type AccountCreateRequest_AvatarLocalPath struct { - AvatarLocalPath string `protobuf:"bytes,2,opt,name=avatarLocalPath,proto3,oneof" json:"avatarLocalPath,omitempty"` -} -type AccountCreateRequest_AvatarColor struct { - AvatarColor string `protobuf:"bytes,3,opt,name=avatarColor,proto3,oneof" json:"avatarColor,omitempty"` -} - -func (*AccountCreateRequest_AvatarLocalPath) isAccountCreateRequest_Avatar() {} -func (*AccountCreateRequest_AvatarColor) isAccountCreateRequest_Avatar() {} - -func (m *AccountCreateRequest) GetAvatar() isAccountCreateRequest_Avatar { - if m != nil { - return m.Avatar - } - return nil -} - -func (m *AccountCreateRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *AccountCreateRequest) GetAvatarLocalPath() string { - if x, ok := m.GetAvatar().(*AccountCreateRequest_AvatarLocalPath); ok { - return x.AvatarLocalPath - } - return "" -} - -func (m *AccountCreateRequest) GetAvatarColor() string { - if x, ok := m.GetAvatar().(*AccountCreateRequest_AvatarColor); ok { - return x.AvatarColor - } - return "" -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AccountCreateRequest) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AccountCreateRequest_AvatarLocalPath)(nil), - (*AccountCreateRequest_AvatarColor)(nil), - } -} - -type AccountCreateResponse struct { - Error *AccountCreateResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *AccountCreateResponse) Reset() { *m = AccountCreateResponse{} } -func (m *AccountCreateResponse) String() string { return proto.CompactTextString(m) } -func (*AccountCreateResponse) ProtoMessage() {} -func (*AccountCreateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{7} -} -func (m *AccountCreateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountCreateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountCreateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountCreateResponse.Merge(m, src) -} -func (m *AccountCreateResponse) XXX_Size() int { - return m.Size() -} -func (m *AccountCreateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountCreateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountCreateResponse proto.InternalMessageInfo - -func (m *AccountCreateResponse) GetError() *AccountCreateResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *AccountCreateResponse) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -type AccountCreateResponse_Error struct { - Code AccountCreateResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.AccountCreateResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *AccountCreateResponse_Error) Reset() { *m = AccountCreateResponse_Error{} } -func (m *AccountCreateResponse_Error) String() string { return proto.CompactTextString(m) } -func (*AccountCreateResponse_Error) ProtoMessage() {} -func (*AccountCreateResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{7, 0} -} -func (m *AccountCreateResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountCreateResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountCreateResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountCreateResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountCreateResponse_Error.Merge(m, src) -} -func (m *AccountCreateResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *AccountCreateResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_AccountCreateResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountCreateResponse_Error proto.InternalMessageInfo - -func (m *AccountCreateResponse_Error) GetCode() AccountCreateResponse_Error_Code { - if m != nil { - return m.Code - } - return AccountCreateResponse_Error_NULL -} - -func (m *AccountCreateResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -// Start accounts search for recovered mnemonic -type AccountRecoverRequest struct { -} - -func (m *AccountRecoverRequest) Reset() { *m = AccountRecoverRequest{} } -func (m *AccountRecoverRequest) String() string { return proto.CompactTextString(m) } -func (*AccountRecoverRequest) ProtoMessage() {} -func (*AccountRecoverRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{8} -} -func (m *AccountRecoverRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountRecoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountRecoverRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountRecoverRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountRecoverRequest.Merge(m, src) -} -func (m *AccountRecoverRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountRecoverRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountRecoverRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountRecoverRequest proto.InternalMessageInfo - -// Found accounts will come in event AccountAdd -type AccountRecoverResponse struct { - Error *AccountRecoverResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *AccountRecoverResponse) Reset() { *m = AccountRecoverResponse{} } -func (m *AccountRecoverResponse) String() string { return proto.CompactTextString(m) } -func (*AccountRecoverResponse) ProtoMessage() {} -func (*AccountRecoverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{9} -} -func (m *AccountRecoverResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountRecoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountRecoverResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountRecoverResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountRecoverResponse.Merge(m, src) -} -func (m *AccountRecoverResponse) XXX_Size() int { - return m.Size() -} -func (m *AccountRecoverResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountRecoverResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountRecoverResponse proto.InternalMessageInfo - -func (m *AccountRecoverResponse) GetError() *AccountRecoverResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -type AccountRecoverResponse_Error struct { - Code AccountRecoverResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.AccountRecoverResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *AccountRecoverResponse_Error) Reset() { *m = AccountRecoverResponse_Error{} } -func (m *AccountRecoverResponse_Error) String() string { return proto.CompactTextString(m) } -func (*AccountRecoverResponse_Error) ProtoMessage() {} -func (*AccountRecoverResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{9, 0} -} -func (m *AccountRecoverResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountRecoverResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountRecoverResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountRecoverResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountRecoverResponse_Error.Merge(m, src) -} -func (m *AccountRecoverResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *AccountRecoverResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_AccountRecoverResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountRecoverResponse_Error proto.InternalMessageInfo - -func (m *AccountRecoverResponse_Error) GetCode() AccountRecoverResponse_Error_Code { - if m != nil { - return m.Code - } - return AccountRecoverResponse_Error_NULL -} - -func (m *AccountRecoverResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type AccountSelectRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // optional, set if this is the first request - RootPath string `protobuf:"bytes,2,opt,name=rootPath,proto3" json:"rootPath,omitempty"` -} - -func (m *AccountSelectRequest) Reset() { *m = AccountSelectRequest{} } -func (m *AccountSelectRequest) String() string { return proto.CompactTextString(m) } -func (*AccountSelectRequest) ProtoMessage() {} -func (*AccountSelectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{10} -} -func (m *AccountSelectRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountSelectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountSelectRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountSelectRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountSelectRequest.Merge(m, src) -} -func (m *AccountSelectRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountSelectRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountSelectRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountSelectRequest proto.InternalMessageInfo - -func (m *AccountSelectRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *AccountSelectRequest) GetRootPath() string { - if m != nil { - return m.RootPath - } - return "" -} - -type AccountSelectResponse struct { - Error *AccountSelectResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *AccountSelectResponse) Reset() { *m = AccountSelectResponse{} } -func (m *AccountSelectResponse) String() string { return proto.CompactTextString(m) } -func (*AccountSelectResponse) ProtoMessage() {} -func (*AccountSelectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{11} -} -func (m *AccountSelectResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountSelectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountSelectResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountSelectResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountSelectResponse.Merge(m, src) -} -func (m *AccountSelectResponse) XXX_Size() int { - return m.Size() -} -func (m *AccountSelectResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountSelectResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountSelectResponse proto.InternalMessageInfo - -func (m *AccountSelectResponse) GetError() *AccountSelectResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *AccountSelectResponse) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -type AccountSelectResponse_Error struct { - Code AccountSelectResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.AccountSelectResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *AccountSelectResponse_Error) Reset() { *m = AccountSelectResponse_Error{} } -func (m *AccountSelectResponse_Error) String() string { return proto.CompactTextString(m) } -func (*AccountSelectResponse_Error) ProtoMessage() {} -func (*AccountSelectResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{11, 0} -} -func (m *AccountSelectResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountSelectResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountSelectResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountSelectResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountSelectResponse_Error.Merge(m, src) -} -func (m *AccountSelectResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *AccountSelectResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_AccountSelectResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountSelectResponse_Error proto.InternalMessageInfo - -func (m *AccountSelectResponse_Error) GetCode() AccountSelectResponse_Error_Code { - if m != nil { - return m.Code - } - return AccountSelectResponse_Error_NULL -} - -func (m *AccountSelectResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type AccountStartRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *AccountStartRequest) Reset() { *m = AccountStartRequest{} } -func (m *AccountStartRequest) String() string { return proto.CompactTextString(m) } -func (*AccountStartRequest) ProtoMessage() {} -func (*AccountStartRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{12} -} -func (m *AccountStartRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountStartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountStartRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountStartRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountStartRequest.Merge(m, src) -} -func (m *AccountStartRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountStartRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountStartRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountStartRequest proto.InternalMessageInfo - -func (m *AccountStartRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type AccountStartResponse struct { - Error *AccountStartResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *AccountStartResponse) Reset() { *m = AccountStartResponse{} } -func (m *AccountStartResponse) String() string { return proto.CompactTextString(m) } -func (*AccountStartResponse) ProtoMessage() {} -func (*AccountStartResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{13} -} -func (m *AccountStartResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountStartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountStartResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountStartResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountStartResponse.Merge(m, src) -} -func (m *AccountStartResponse) XXX_Size() int { - return m.Size() -} -func (m *AccountStartResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountStartResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountStartResponse proto.InternalMessageInfo - -func (m *AccountStartResponse) GetError() *AccountStartResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *AccountStartResponse) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -type AccountStartResponse_Error struct { - Code AccountStartResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.AccountStartResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *AccountStartResponse_Error) Reset() { *m = AccountStartResponse_Error{} } -func (m *AccountStartResponse_Error) String() string { return proto.CompactTextString(m) } -func (*AccountStartResponse_Error) ProtoMessage() {} -func (*AccountStartResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{13, 0} -} -func (m *AccountStartResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountStartResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountStartResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountStartResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountStartResponse_Error.Merge(m, src) -} -func (m *AccountStartResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *AccountStartResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_AccountStartResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountStartResponse_Error proto.InternalMessageInfo - -func (m *AccountStartResponse_Error) GetCode() AccountStartResponse_Error_Code { - if m != nil { - return m.Code - } - return AccountStartResponse_Error_NULL -} - -func (m *AccountStartResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type AccountShow struct { - Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *AccountShow) Reset() { *m = AccountShow{} } -func (m *AccountShow) String() string { return proto.CompactTextString(m) } -func (*AccountShow) ProtoMessage() {} -func (*AccountShow) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{14} -} -func (m *AccountShow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountShow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountShow.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountShow) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountShow.Merge(m, src) -} -func (m *AccountShow) XXX_Size() int { - return m.Size() -} -func (m *AccountShow) XXX_DiscardUnknown() { - xxx_messageInfo_AccountShow.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountShow proto.InternalMessageInfo - -func (m *AccountShow) GetIndex() int64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *AccountShow) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -func init() { - proto.RegisterEnum("anytype.WalletCreateResponse_Error_Code", WalletCreateResponse_Error_Code_name, WalletCreateResponse_Error_Code_value) - proto.RegisterEnum("anytype.WalletRecoverResponse_Error_Code", WalletRecoverResponse_Error_Code_name, WalletRecoverResponse_Error_Code_value) - proto.RegisterEnum("anytype.AccountCreateResponse_Error_Code", AccountCreateResponse_Error_Code_name, AccountCreateResponse_Error_Code_value) - proto.RegisterEnum("anytype.AccountRecoverResponse_Error_Code", AccountRecoverResponse_Error_Code_name, AccountRecoverResponse_Error_Code_value) - proto.RegisterEnum("anytype.AccountSelectResponse_Error_Code", AccountSelectResponse_Error_Code_name, AccountSelectResponse_Error_Code_value) - proto.RegisterEnum("anytype.AccountStartResponse_Error_Code", AccountStartResponse_Error_Code_name, AccountStartResponse_Error_Code_value) - proto.RegisterType((*Avatar)(nil), "anytype.Avatar") - proto.RegisterType((*Account)(nil), "anytype.Account") - proto.RegisterType((*WalletCreateRequest)(nil), "anytype.WalletCreateRequest") - proto.RegisterType((*WalletCreateResponse)(nil), "anytype.WalletCreateResponse") - proto.RegisterType((*WalletCreateResponse_Error)(nil), "anytype.WalletCreateResponse.Error") - proto.RegisterType((*WalletRecoverRequest)(nil), "anytype.WalletRecoverRequest") - proto.RegisterType((*WalletRecoverResponse)(nil), "anytype.WalletRecoverResponse") - proto.RegisterType((*WalletRecoverResponse_Error)(nil), "anytype.WalletRecoverResponse.Error") - proto.RegisterType((*AccountCreateRequest)(nil), "anytype.AccountCreateRequest") - proto.RegisterType((*AccountCreateResponse)(nil), "anytype.AccountCreateResponse") - proto.RegisterType((*AccountCreateResponse_Error)(nil), "anytype.AccountCreateResponse.Error") - proto.RegisterType((*AccountRecoverRequest)(nil), "anytype.AccountRecoverRequest") - proto.RegisterType((*AccountRecoverResponse)(nil), "anytype.AccountRecoverResponse") - proto.RegisterType((*AccountRecoverResponse_Error)(nil), "anytype.AccountRecoverResponse.Error") - proto.RegisterType((*AccountSelectRequest)(nil), "anytype.AccountSelectRequest") - proto.RegisterType((*AccountSelectResponse)(nil), "anytype.AccountSelectResponse") - proto.RegisterType((*AccountSelectResponse_Error)(nil), "anytype.AccountSelectResponse.Error") - proto.RegisterType((*AccountStartRequest)(nil), "anytype.AccountStartRequest") - proto.RegisterType((*AccountStartResponse)(nil), "anytype.AccountStartResponse") - proto.RegisterType((*AccountStartResponse_Error)(nil), "anytype.AccountStartResponse.Error") - proto.RegisterType((*AccountShow)(nil), "anytype.AccountShow") -} - -func init() { proto.RegisterFile("account.proto", fileDescriptor_8e28828dcb8d24f0) } - -var fileDescriptor_8e28828dcb8d24f0 = []byte{ - // 903 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcd, 0x6f, 0xe3, 0x44, - 0x18, 0xc6, 0x63, 0xa7, 0xe9, 0xc7, 0x1b, 0xb5, 0xeb, 0x9d, 0x6d, 0xbb, 0x55, 0x76, 0x95, 0xad, - 0xbc, 0xec, 0x52, 0x2a, 0x14, 0x89, 0x72, 0xe2, 0x53, 0x72, 0xec, 0x89, 0x88, 0x48, 0xc7, 0xd5, - 0x78, 0xd2, 0x22, 0x2e, 0x23, 0xaf, 0x33, 0x6d, 0x2d, 0xa5, 0x99, 0xe0, 0x7a, 0x17, 0xf6, 0xce, - 0x15, 0x09, 0x89, 0xc3, 0xfe, 0x05, 0x88, 0x0b, 0x1c, 0xb9, 0x20, 0xb8, 0x83, 0x84, 0xd0, 0x1e, - 0x39, 0x42, 0xfb, 0x8f, 0xa0, 0xf8, 0x23, 0x89, 0x4d, 0xdb, 0x7c, 0x48, 0x2b, 0xed, 0x2d, 0xf3, - 0xfa, 0x99, 0xf7, 0xb5, 0x9f, 0xdf, 0x3c, 0x8e, 0x61, 0xd5, 0xf5, 0x3c, 0xf9, 0xb4, 0x17, 0xd6, - 0xfa, 0x81, 0x0c, 0x25, 0x5a, 0x72, 0x7b, 0xcf, 0xc3, 0xe7, 0x7d, 0x51, 0x81, 0x63, 0xbf, 0x2b, - 0xe2, 0xa2, 0x4e, 0x61, 0xd1, 0x78, 0xe6, 0x86, 0x6e, 0x80, 0x1e, 0x43, 0xc9, 0x3f, 0x73, 0x4f, - 0xc4, 0x96, 0xb2, 0xad, 0xec, 0x94, 0xf7, 0xd6, 0x6a, 0x89, 0xbc, 0xd6, 0x1c, 0x54, 0x3f, 0x29, - 0xd0, 0xf8, 0x32, 0xda, 0x84, 0x92, 0x27, 0xbb, 0x32, 0xd8, 0x52, 0xb7, 0x95, 0x9d, 0x95, 0x41, - 0x3d, 0x5a, 0xd6, 0x97, 0x61, 0xd1, 0x8d, 0x3a, 0xe9, 0x87, 0xb0, 0x64, 0xc4, 0x93, 0xd1, 0x1a, - 0xa8, 0x7e, 0x27, 0xea, 0xb8, 0x42, 0x55, 0xbf, 0x83, 0x10, 0x2c, 0xf4, 0xdc, 0x33, 0x11, 0xef, - 0xa5, 0xd1, 0x6f, 0xf4, 0x66, 0xba, 0x71, 0xab, 0x18, 0x4d, 0xbe, 0x35, 0x9c, 0x1c, 0xdf, 0x19, - 0x4d, 0xfb, 0xbe, 0x03, 0x77, 0x8e, 0xdc, 0x6e, 0x57, 0x84, 0x66, 0x20, 0xdc, 0x50, 0x50, 0xf1, - 0xc5, 0x53, 0x71, 0x1e, 0xa2, 0x0a, 0x2c, 0x07, 0x52, 0x86, 0x07, 0x6e, 0x78, 0x9a, 0x4c, 0x1a, - 0xae, 0xf5, 0x1f, 0x55, 0x58, 0xcf, 0xee, 0x39, 0xef, 0xcb, 0xde, 0xb9, 0x40, 0xef, 0x41, 0x49, - 0x04, 0x81, 0x0c, 0x92, 0xa7, 0x7d, 0x38, 0x9c, 0x79, 0x95, 0xba, 0x86, 0x07, 0x52, 0x1a, 0xef, - 0x18, 0xcc, 0x3b, 0xeb, 0x89, 0x33, 0xd9, 0xf3, 0xbd, 0xe4, 0x39, 0x86, 0xeb, 0xca, 0xaf, 0x0a, - 0x94, 0x22, 0x31, 0xfa, 0x10, 0x16, 0x3c, 0xd9, 0x89, 0xdd, 0x5c, 0xdb, 0xdb, 0x99, 0xa2, 0x7f, - 0xcd, 0x94, 0x1d, 0x41, 0xa3, 0x5d, 0x68, 0x1b, 0xca, 0x1d, 0x71, 0xee, 0x05, 0x7e, 0x3f, 0xf4, - 0x65, 0x2f, 0x19, 0x33, 0x5e, 0xd2, 0x1d, 0x58, 0x18, 0xe8, 0xd1, 0x32, 0x2c, 0x90, 0x76, 0xab, - 0xa5, 0x15, 0xd0, 0x6d, 0x58, 0x6d, 0x93, 0x4f, 0x89, 0x7d, 0x44, 0x38, 0xa6, 0xd4, 0xa6, 0x9a, - 0x82, 0x56, 0x61, 0xa5, 0x6e, 0x58, 0xbc, 0x49, 0x0e, 0xda, 0x4c, 0x53, 0xd1, 0x03, 0xb8, 0xd7, - 0x30, 0x9a, 0x2d, 0x6c, 0x71, 0x66, 0x73, 0x93, 0x62, 0x83, 0x61, 0xde, 0xb2, 0x4d, 0xa3, 0xc5, - 0x29, 0x3e, 0xb0, 0x35, 0xa1, 0x93, 0xd4, 0x2d, 0x2a, 0x3c, 0xf9, 0x4c, 0x04, 0x53, 0x58, 0x7c, - 0x93, 0x1d, 0xfa, 0x77, 0x2a, 0x6c, 0xe4, 0x1a, 0x26, 0xfe, 0xbf, 0x9f, 0xf5, 0xff, 0x8d, 0x9c, - 0x3f, 0x39, 0x79, 0x06, 0x40, 0xe5, 0xb7, 0xa1, 0xc9, 0x1f, 0x65, 0x4c, 0x7e, 0x6b, 0x9a, 0x26, - 0xaf, 0x81, 0xcb, 0x5f, 0x2b, 0xb0, 0x9e, 0x04, 0x24, 0x7b, 0x92, 0xd3, 0x74, 0x28, 0x63, 0xe9, - 0xd8, 0x85, 0x5b, 0xf1, 0xf1, 0x6f, 0x49, 0xcf, 0xed, 0x46, 0x04, 0xd2, 0xe0, 0xe5, 0x2f, 0x20, - 0x1d, 0xca, 0x71, 0xc9, 0x8c, 0x02, 0x5a, 0x4c, 0x74, 0xe3, 0xc5, 0xb1, 0x98, 0xfe, 0x50, 0x84, - 0x8d, 0xdc, 0x6d, 0x4c, 0x82, 0x73, 0xa5, 0x3c, 0x9b, 0x8e, 0x5d, 0x58, 0x4a, 0x5e, 0x3b, 0xd1, - 0x7d, 0x96, 0xf7, 0xb4, 0xfc, 0x6e, 0x9a, 0x0a, 0x2a, 0xdf, 0xab, 0x93, 0x40, 0xde, 0x30, 0x70, - 0x36, 0x90, 0xbf, 0x28, 0x73, 0x90, 0x7c, 0x1b, 0x76, 0x0c, 0xd3, 0xb4, 0xdb, 0x84, 0x25, 0x1c, - 0x2d, 0x5e, 0x6f, 0x33, 0x3e, 0xa2, 0xeb, 0x30, 0x83, 0x32, 0x4e, 0x6c, 0x0b, 0x6b, 0x03, 0x52, - 0x8f, 0x27, 0xa8, 0x31, 0xe3, 0xc4, 0xd8, 0xc7, 0xda, 0xf1, 0x14, 0x9d, 0x31, 0xe3, 0xc6, 0xa1, - 0xc1, 0x0c, 0xaa, 0x9d, 0xe8, 0x77, 0x87, 0xa0, 0xb2, 0xb9, 0xd4, 0xbf, 0x29, 0xc2, 0x66, 0xfe, - 0x4a, 0xc2, 0xf0, 0x83, 0x2c, 0xc3, 0x47, 0xff, 0xa3, 0x70, 0x53, 0xc2, 0x7e, 0x1e, 0x82, 0xf9, - 0x38, 0x03, 0x66, 0x77, 0xaa, 0x2e, 0xb3, 0x91, 0xf9, 0x63, 0x1e, 0x32, 0x1b, 0x70, 0x9b, 0xd8, - 0x3c, 0xb1, 0xd0, 0xe1, 0x0d, 0xbb, 0x4d, 0x2c, 0x6d, 0x30, 0xed, 0x3e, 0xc1, 0xb1, 0x81, 0x14, - 0x9b, 0xf6, 0x21, 0xa6, 0xfc, 0xc8, 0x68, 0xb5, 0x30, 0xe3, 0x8d, 0x26, 0x75, 0x98, 0x76, 0x3c, - 0x29, 0x9c, 0x27, 0xe8, 0x21, 0x3c, 0x18, 0xad, 0x39, 0xfe, 0xac, 0xe9, 0x30, 0x27, 0x62, 0x63, - 0xda, 0x94, 0xb6, 0x0f, 0x18, 0xb6, 0xb4, 0x53, 0xb4, 0x09, 0x68, 0xd4, 0x85, 0xb6, 0x49, 0x7c, - 0x04, 0x7c, 0xbd, 0x3e, 0x0c, 0xb6, 0x23, 0xba, 0xc2, 0x0b, 0xd3, 0x60, 0xe7, 0xff, 0x06, 0xc7, - 0xdf, 0xa7, 0x6a, 0xee, 0x2f, 0xeb, 0xaf, 0x51, 0x2c, 0xd3, 0x26, 0x53, 0xc6, 0x32, 0x2b, 0x9f, - 0x3f, 0x96, 0x7f, 0x4e, 0x1b, 0xcb, 0xab, 0x06, 0xce, 0x06, 0xff, 0x5f, 0xe5, 0x15, 0xbc, 0x60, - 0xa7, 0x61, 0x78, 0x7c, 0x0d, 0xc3, 0x93, 0x6c, 0xf7, 0x46, 0x93, 0x58, 0xe9, 0x31, 0xe3, 0x4d, - 0xd2, 0xb0, 0xb5, 0x53, 0x54, 0x83, 0xdd, 0xb1, 0xee, 0xc4, 0x66, 0xe9, 0x04, 0x83, 0x58, 0x7c, - 0x9f, 0xe0, 0x7d, 0x9b, 0x34, 0xcd, 0xa8, 0xee, 0x60, 0xa6, 0xf9, 0xfa, 0x23, 0xb8, 0x93, 0xfa, - 0x15, 0xba, 0xc1, 0x75, 0x67, 0x42, 0x7f, 0x51, 0x1c, 0x1d, 0x9e, 0x58, 0x37, 0xe9, 0x53, 0xe5, - 0x2a, 0xf5, 0xfc, 0xd4, 0x5f, 0xa8, 0x93, 0x3e, 0x5d, 0xae, 0x9f, 0x37, 0x1b, 0xf4, 0x9f, 0xe6, - 0x81, 0x7e, 0x0f, 0xee, 0x8e, 0xb9, 0x6e, 0xd9, 0xd8, 0x21, 0x89, 0xf1, 0xaf, 0x1a, 0xb8, 0x6e, - 0x43, 0x39, 0x7d, 0xf4, 0x53, 0xf9, 0x25, 0x5a, 0x87, 0x92, 0xdf, 0xeb, 0x88, 0xaf, 0x22, 0x7f, - 0x8a, 0x34, 0x5e, 0xcc, 0x62, 0x75, 0xfd, 0xfe, 0xef, 0x17, 0x55, 0xe5, 0xe5, 0x45, 0x55, 0xf9, - 0xe7, 0xa2, 0xaa, 0x7c, 0x7b, 0x59, 0x2d, 0xbc, 0xbc, 0xac, 0x16, 0xfe, 0xbe, 0xac, 0x16, 0x3e, - 0x57, 0xfb, 0x4f, 0x9e, 0x2c, 0x46, 0x5f, 0xe6, 0xef, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x6b, - 0x01, 0x78, 0x28, 0xbf, 0x0b, 0x00, 0x00, -} - -func (m *Avatar) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Avatar) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Avatar) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Avatar != nil { - { - size := m.Avatar.Size() - i -= size - if _, err := m.Avatar.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Avatar_Image) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Avatar_Image) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Image != nil { - { - size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Avatar_Color) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Avatar_Color) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Color) - copy(dAtA[i:], m.Color) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Color))) - i-- - dAtA[i] = 0x12 - return len(dAtA) - i, nil -} -func (m *Account) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Account) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Avatar != nil { - { - size, err := m.Avatar.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletCreateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WalletCreateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RootPath) > 0 { - i -= len(m.RootPath) - copy(dAtA[i:], m.RootPath) - i = encodeVarintAccount(dAtA, i, uint64(len(m.RootPath))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletCreateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WalletCreateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Mnemonic) > 0 { - i -= len(m.Mnemonic) - copy(dAtA[i:], m.Mnemonic) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Mnemonic))) - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletCreateResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WalletCreateResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletCreateResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *WalletRecoverRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WalletRecoverRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletRecoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Mnemonic) > 0 { - i -= len(m.Mnemonic) - copy(dAtA[i:], m.Mnemonic) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Mnemonic))) - i-- - dAtA[i] = 0x12 - } - if len(m.RootPath) > 0 { - i -= len(m.RootPath) - copy(dAtA[i:], m.RootPath) - i = encodeVarintAccount(dAtA, i, uint64(len(m.RootPath))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletRecoverResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WalletRecoverResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletRecoverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletRecoverResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WalletRecoverResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletRecoverResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountCreateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountCreateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Avatar != nil { - { - size := m.Avatar.Size() - i -= size - if _, err := m.Avatar.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountCreateRequest_AvatarLocalPath) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountCreateRequest_AvatarLocalPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.AvatarLocalPath) - copy(dAtA[i:], m.AvatarLocalPath) - i = encodeVarintAccount(dAtA, i, uint64(len(m.AvatarLocalPath))) - i-- - dAtA[i] = 0x12 - return len(dAtA) - i, nil -} -func (m *AccountCreateRequest_AvatarColor) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountCreateRequest_AvatarColor) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.AvatarColor) - copy(dAtA[i:], m.AvatarColor) - i = encodeVarintAccount(dAtA, i, uint64(len(m.AvatarColor))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *AccountCreateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountCreateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountCreateResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountCreateResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountCreateResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountRecoverRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountRecoverRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountRecoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AccountRecoverResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountRecoverResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountRecoverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountRecoverResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountRecoverResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountRecoverResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountSelectRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountSelectRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountSelectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RootPath) > 0 { - i -= len(m.RootPath) - copy(dAtA[i:], m.RootPath) - i = encodeVarintAccount(dAtA, i, uint64(len(m.RootPath))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountSelectResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountSelectResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountSelectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountSelectResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountSelectResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountSelectResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountStartRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountStartRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountStartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountStartResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountStartResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountStartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountStartResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountStartResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountStartResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountShow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountShow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Index != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { - offset -= sovAccount(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Avatar) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Avatar != nil { - n += m.Avatar.Size() - } - return n -} - -func (m *Avatar_Image) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Image != nil { - l = m.Image.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} -func (m *Avatar_Color) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Color) - n += 1 + l + sovAccount(uint64(l)) - return n -} -func (m *Account) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - if m.Avatar != nil { - l = m.Avatar.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *WalletCreateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RootPath) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *WalletCreateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.Mnemonic) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *WalletCreateResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovAccount(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *WalletRecoverRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RootPath) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.Mnemonic) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *WalletRecoverResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *WalletRecoverResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovAccount(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountCreateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - if m.Avatar != nil { - n += m.Avatar.Size() - } - return n -} - -func (m *AccountCreateRequest_AvatarLocalPath) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AvatarLocalPath) - n += 1 + l + sovAccount(uint64(l)) - return n -} -func (m *AccountCreateRequest_AvatarColor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AvatarColor) - n += 1 + l + sovAccount(uint64(l)) - return n -} -func (m *AccountCreateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovAccount(uint64(l)) - } - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountCreateResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovAccount(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountRecoverRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AccountRecoverResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountRecoverResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovAccount(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountSelectRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.RootPath) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountSelectResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovAccount(uint64(l)) - } - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountSelectResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovAccount(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountStartRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountStartResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovAccount(uint64(l)) - } - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountStartResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovAccount(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func (m *AccountShow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Index != 0 { - n += 1 + sovAccount(uint64(m.Index)) - } - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func sovAccount(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAccount(x uint64) (n int) { - return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Avatar) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Avatar: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Avatar: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Image{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Avatar = &Avatar_Image{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Color", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Avatar = &Avatar_Color{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Account) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Account: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Avatar", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Avatar == nil { - m.Avatar = &Avatar{} - } - if err := m.Avatar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletCreateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WalletCreateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletCreateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WalletCreateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletCreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &WalletCreateResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mnemonic", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mnemonic = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletCreateResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= WalletCreateResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletRecoverRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WalletRecoverRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletRecoverRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mnemonic", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mnemonic = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletRecoverResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WalletRecoverResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletRecoverResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &WalletRecoverResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletRecoverResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= WalletRecoverResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountCreateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountCreateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AvatarLocalPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Avatar = &AccountCreateRequest_AvatarLocalPath{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AvatarColor", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Avatar = &AccountCreateRequest_AvatarColor{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountCreateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountCreateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountCreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &AccountCreateResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountCreateResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= AccountCreateResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountRecoverRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountRecoverRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountRecoverRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountRecoverResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountRecoverResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountRecoverResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &AccountRecoverResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountRecoverResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= AccountRecoverResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountSelectRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountSelectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountSelectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountSelectResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountSelectResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountSelectResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &AccountSelectResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountSelectResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= AccountSelectResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountStartRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountStartRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountStartRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountStartResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountStartResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountStartResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &AccountStartResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountStartResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= AccountStartResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountShow) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountShow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountShow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAccount(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAccount - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAccount - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAccount - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pb/block.pb.go b/pb/block.pb.go deleted file mode 100644 index 5ef5a3c80..000000000 --- a/pb/block.pb.go +++ /dev/null @@ -1,9494 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: block.proto - -package pb - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type BlockType int32 - -const ( - BlockType_DASHBOARD BlockType = 0 - BlockType_PAGE BlockType = 1 - BlockType_DATAVIEW BlockType = 2 - BlockType_TEXT BlockType = 3 - BlockType_FILE BlockType = 4 - BlockType_PICTURE BlockType = 5 - BlockType_VIDEO BlockType = 6 -) - -var BlockType_name = map[int32]string{ - 0: "DASHBOARD", - 1: "PAGE", - 2: "DATAVIEW", - 3: "TEXT", - 4: "FILE", - 5: "PICTURE", - 6: "VIDEO", -} - -var BlockType_value = map[string]int32{ - "DASHBOARD": 0, - "PAGE": 1, - "DATAVIEW": 2, - "TEXT": 3, - "FILE": 4, - "PICTURE": 5, - "VIDEO": 6, -} - -func (x BlockType) String() string { - return proto.EnumName(BlockType_name, int32(x)) -} - -func (BlockType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{0} -} - -type BlockOpenResponse_Error_Code int32 - -const ( - BlockOpenResponse_Error_NULL BlockOpenResponse_Error_Code = 0 - BlockOpenResponse_Error_UNKNOWN_ERROR BlockOpenResponse_Error_Code = 1 - BlockOpenResponse_Error_BAD_INPUT BlockOpenResponse_Error_Code = 2 -) - -var BlockOpenResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", -} - -var BlockOpenResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, -} - -func (x BlockOpenResponse_Error_Code) String() string { - return proto.EnumName(BlockOpenResponse_Error_Code_name, int32(x)) -} - -func (BlockOpenResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{1, 0, 0} -} - -type BlockCreateResponse_Error_Code int32 - -const ( - BlockCreateResponse_Error_NULL BlockCreateResponse_Error_Code = 0 - BlockCreateResponse_Error_UNKNOWN_ERROR BlockCreateResponse_Error_Code = 1 - BlockCreateResponse_Error_BAD_INPUT BlockCreateResponse_Error_Code = 2 -) - -var BlockCreateResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", -} - -var BlockCreateResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, -} - -func (x BlockCreateResponse_Error_Code) String() string { - return proto.EnumName(BlockCreateResponse_Error_Code_name, int32(x)) -} - -func (BlockCreateResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{3, 0, 0} -} - -type BlockUpdateResponse_Error_Code int32 - -const ( - BlockUpdateResponse_Error_NULL BlockUpdateResponse_Error_Code = 0 - BlockUpdateResponse_Error_UNKNOWN_ERROR BlockUpdateResponse_Error_Code = 1 - BlockUpdateResponse_Error_BAD_INPUT BlockUpdateResponse_Error_Code = 2 -) - -var BlockUpdateResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", -} - -var BlockUpdateResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, -} - -func (x BlockUpdateResponse_Error_Code) String() string { - return proto.EnumName(BlockUpdateResponse_Error_Code_name, int32(x)) -} - -func (BlockUpdateResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{5, 0, 0} -} - -type BlockContentPage_Style int32 - -const ( - BlockContentPage_EMPTY BlockContentPage_Style = 0 - BlockContentPage_TASK BlockContentPage_Style = 1 - BlockContentPage_BOOKMARK BlockContentPage_Style = 2 - BlockContentPage_SET BlockContentPage_Style = 3 -) - -var BlockContentPage_Style_name = map[int32]string{ - 0: "EMPTY", - 1: "TASK", - 2: "BOOKMARK", - 3: "SET", -} - -var BlockContentPage_Style_value = map[string]int32{ - "EMPTY": 0, - "TASK": 1, - "BOOKMARK": 2, - "SET": 3, -} - -func (x BlockContentPage_Style) String() string { - return proto.EnumName(BlockContentPage_Style_name, int32(x)) -} - -func (BlockContentPage_Style) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{22, 0} -} - -type BlockContentDashboard_Style int32 - -const ( - BlockContentDashboard_MAIN_SCREEN BlockContentDashboard_Style = 0 -) - -var BlockContentDashboard_Style_name = map[int32]string{ - 0: "MAIN_SCREEN", -} - -var BlockContentDashboard_Style_value = map[string]int32{ - "MAIN_SCREEN": 0, -} - -func (x BlockContentDashboard_Style) String() string { - return proto.EnumName(BlockContentDashboard_Style_name, int32(x)) -} - -func (BlockContentDashboard_Style) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{23, 0} -} - -type BlockContentText_Style int32 - -const ( - BlockContentText_p BlockContentText_Style = 0 - BlockContentText_h1 BlockContentText_Style = 1 - BlockContentText_h2 BlockContentText_Style = 2 - BlockContentText_h3 BlockContentText_Style = 3 - BlockContentText_h4 BlockContentText_Style = 4 - BlockContentText_quote BlockContentText_Style = 5 -) - -var BlockContentText_Style_name = map[int32]string{ - 0: "p", - 1: "h1", - 2: "h2", - 3: "h3", - 4: "h4", - 5: "quote", -} - -var BlockContentText_Style_value = map[string]int32{ - "p": 0, - "h1": 1, - "h2": 2, - "h3": 3, - "h4": 4, - "quote": 5, -} - -func (x BlockContentText_Style) String() string { - return proto.EnumName(BlockContentText_Style_name, int32(x)) -} - -func (BlockContentText_Style) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{25, 0} -} - -type BlockContentText_MarkerType int32 - -const ( - BlockContentText_none BlockContentText_MarkerType = 0 - BlockContentText_number BlockContentText_MarkerType = 1 - BlockContentText_bullet BlockContentText_MarkerType = 2 -) - -var BlockContentText_MarkerType_name = map[int32]string{ - 0: "none", - 1: "number", - 2: "bullet", -} - -var BlockContentText_MarkerType_value = map[string]int32{ - "none": 0, - "number": 1, - "bullet": 2, -} - -func (x BlockContentText_MarkerType) String() string { - return proto.EnumName(BlockContentText_MarkerType_name, int32(x)) -} - -func (BlockContentText_MarkerType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{25, 1} -} - -type BlockContentText_Mark_Type int32 - -const ( - BlockContentText_Mark_STRIKETHROUGH BlockContentText_Mark_Type = 0 - BlockContentText_Mark_KEYBOARD BlockContentText_Mark_Type = 1 - BlockContentText_Mark_ITALIC BlockContentText_Mark_Type = 2 - BlockContentText_Mark_BOLD BlockContentText_Mark_Type = 3 - BlockContentText_Mark_LINK BlockContentText_Mark_Type = 4 -) - -var BlockContentText_Mark_Type_name = map[int32]string{ - 0: "STRIKETHROUGH", - 1: "KEYBOARD", - 2: "ITALIC", - 3: "BOLD", - 4: "LINK", -} - -var BlockContentText_Mark_Type_value = map[string]int32{ - "STRIKETHROUGH": 0, - "KEYBOARD": 1, - "ITALIC": 2, - "BOLD": 3, - "LINK": 4, -} - -func (x BlockContentText_Mark_Type) String() string { - return proto.EnumName(BlockContentText_Mark_Type_name, int32(x)) -} - -func (BlockContentText_Mark_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{25, 1, 0} -} - -// commands -// -type BlockOpenRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *BlockOpenRequest) Reset() { *m = BlockOpenRequest{} } -func (m *BlockOpenRequest) String() string { return proto.CompactTextString(m) } -func (*BlockOpenRequest) ProtoMessage() {} -func (*BlockOpenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{0} -} -func (m *BlockOpenRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockOpenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockOpenRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockOpenRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockOpenRequest.Merge(m, src) -} -func (m *BlockOpenRequest) XXX_Size() int { - return m.Size() -} -func (m *BlockOpenRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockOpenRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockOpenRequest proto.InternalMessageInfo - -func (m *BlockOpenRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type BlockOpenResponse struct { - Error *BlockOpenResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - BlockHeader *BlockHeader `protobuf:"bytes,2,opt,name=blockHeader,proto3" json:"blockHeader,omitempty"` -} - -func (m *BlockOpenResponse) Reset() { *m = BlockOpenResponse{} } -func (m *BlockOpenResponse) String() string { return proto.CompactTextString(m) } -func (*BlockOpenResponse) ProtoMessage() {} -func (*BlockOpenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{1} -} -func (m *BlockOpenResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockOpenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockOpenResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockOpenResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockOpenResponse.Merge(m, src) -} -func (m *BlockOpenResponse) XXX_Size() int { - return m.Size() -} -func (m *BlockOpenResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlockOpenResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockOpenResponse proto.InternalMessageInfo - -func (m *BlockOpenResponse) GetError() *BlockOpenResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *BlockOpenResponse) GetBlockHeader() *BlockHeader { - if m != nil { - return m.BlockHeader - } - return nil -} - -type BlockOpenResponse_Error struct { - Code BlockOpenResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.BlockOpenResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *BlockOpenResponse_Error) Reset() { *m = BlockOpenResponse_Error{} } -func (m *BlockOpenResponse_Error) String() string { return proto.CompactTextString(m) } -func (*BlockOpenResponse_Error) ProtoMessage() {} -func (*BlockOpenResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{1, 0} -} -func (m *BlockOpenResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockOpenResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockOpenResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockOpenResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockOpenResponse_Error.Merge(m, src) -} -func (m *BlockOpenResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *BlockOpenResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_BlockOpenResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockOpenResponse_Error proto.InternalMessageInfo - -func (m *BlockOpenResponse_Error) GetCode() BlockOpenResponse_Error_Code { - if m != nil { - return m.Code - } - return BlockOpenResponse_Error_NULL -} - -func (m *BlockOpenResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type BlockCreateRequest struct { - Type BlockType `protobuf:"varint,1,opt,name=type,proto3,enum=anytype.BlockType" json:"type,omitempty"` -} - -func (m *BlockCreateRequest) Reset() { *m = BlockCreateRequest{} } -func (m *BlockCreateRequest) String() string { return proto.CompactTextString(m) } -func (*BlockCreateRequest) ProtoMessage() {} -func (*BlockCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{2} -} -func (m *BlockCreateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockCreateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockCreateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockCreateRequest.Merge(m, src) -} -func (m *BlockCreateRequest) XXX_Size() int { - return m.Size() -} -func (m *BlockCreateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockCreateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockCreateRequest proto.InternalMessageInfo - -func (m *BlockCreateRequest) GetType() BlockType { - if m != nil { - return m.Type - } - return BlockType_DASHBOARD -} - -type BlockCreateResponse struct { - Error *BlockCreateResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *BlockCreateResponse) Reset() { *m = BlockCreateResponse{} } -func (m *BlockCreateResponse) String() string { return proto.CompactTextString(m) } -func (*BlockCreateResponse) ProtoMessage() {} -func (*BlockCreateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{3} -} -func (m *BlockCreateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockCreateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockCreateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockCreateResponse.Merge(m, src) -} -func (m *BlockCreateResponse) XXX_Size() int { - return m.Size() -} -func (m *BlockCreateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlockCreateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockCreateResponse proto.InternalMessageInfo - -func (m *BlockCreateResponse) GetError() *BlockCreateResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -type BlockCreateResponse_Error struct { - Code BlockCreateResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.BlockCreateResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *BlockCreateResponse_Error) Reset() { *m = BlockCreateResponse_Error{} } -func (m *BlockCreateResponse_Error) String() string { return proto.CompactTextString(m) } -func (*BlockCreateResponse_Error) ProtoMessage() {} -func (*BlockCreateResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{3, 0} -} -func (m *BlockCreateResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockCreateResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockCreateResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockCreateResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockCreateResponse_Error.Merge(m, src) -} -func (m *BlockCreateResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *BlockCreateResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_BlockCreateResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockCreateResponse_Error proto.InternalMessageInfo - -func (m *BlockCreateResponse_Error) GetCode() BlockCreateResponse_Error_Code { - if m != nil { - return m.Code - } - return BlockCreateResponse_Error_NULL -} - -func (m *BlockCreateResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type BlockUpdateRequest struct { - Changes *BlockChanges `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"` -} - -func (m *BlockUpdateRequest) Reset() { *m = BlockUpdateRequest{} } -func (m *BlockUpdateRequest) String() string { return proto.CompactTextString(m) } -func (*BlockUpdateRequest) ProtoMessage() {} -func (*BlockUpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{4} -} -func (m *BlockUpdateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockUpdateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockUpdateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockUpdateRequest.Merge(m, src) -} -func (m *BlockUpdateRequest) XXX_Size() int { - return m.Size() -} -func (m *BlockUpdateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockUpdateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockUpdateRequest proto.InternalMessageInfo - -func (m *BlockUpdateRequest) GetChanges() *BlockChanges { - if m != nil { - return m.Changes - } - return nil -} - -type BlockUpdateResponse struct { - Error *BlockUpdateResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *BlockUpdateResponse) Reset() { *m = BlockUpdateResponse{} } -func (m *BlockUpdateResponse) String() string { return proto.CompactTextString(m) } -func (*BlockUpdateResponse) ProtoMessage() {} -func (*BlockUpdateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{5} -} -func (m *BlockUpdateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockUpdateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockUpdateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockUpdateResponse.Merge(m, src) -} -func (m *BlockUpdateResponse) XXX_Size() int { - return m.Size() -} -func (m *BlockUpdateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlockUpdateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockUpdateResponse proto.InternalMessageInfo - -func (m *BlockUpdateResponse) GetError() *BlockUpdateResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -type BlockUpdateResponse_Error struct { - Code BlockUpdateResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.BlockUpdateResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *BlockUpdateResponse_Error) Reset() { *m = BlockUpdateResponse_Error{} } -func (m *BlockUpdateResponse_Error) String() string { return proto.CompactTextString(m) } -func (*BlockUpdateResponse_Error) ProtoMessage() {} -func (*BlockUpdateResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{5, 0} -} -func (m *BlockUpdateResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockUpdateResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockUpdateResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockUpdateResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockUpdateResponse_Error.Merge(m, src) -} -func (m *BlockUpdateResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *BlockUpdateResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_BlockUpdateResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockUpdateResponse_Error proto.InternalMessageInfo - -func (m *BlockUpdateResponse_Error) GetCode() BlockUpdateResponse_Error_Code { - if m != nil { - return m.Code - } - return BlockUpdateResponse_Error_NULL -} - -func (m *BlockUpdateResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -// call -type BlockShow struct { - Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` -} - -func (m *BlockShow) Reset() { *m = BlockShow{} } -func (m *BlockShow) String() string { return proto.CompactTextString(m) } -func (*BlockShow) ProtoMessage() {} -func (*BlockShow) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{6} -} -func (m *BlockShow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockShow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockShow.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockShow) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockShow.Merge(m, src) -} -func (m *BlockShow) XXX_Size() int { - return m.Size() -} -func (m *BlockShow) XXX_DiscardUnknown() { - xxx_messageInfo_BlockShow.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockShow proto.InternalMessageInfo - -func (m *BlockShow) GetBlock() *Block { - if m != nil { - return m.Block - } - return nil -} - -type BlockUpdate struct { - Changes *BlockChanges `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"` -} - -func (m *BlockUpdate) Reset() { *m = BlockUpdate{} } -func (m *BlockUpdate) String() string { return proto.CompactTextString(m) } -func (*BlockUpdate) ProtoMessage() {} -func (*BlockUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{7} -} -func (m *BlockUpdate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockUpdate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockUpdate.Merge(m, src) -} -func (m *BlockUpdate) XXX_Size() int { - return m.Size() -} -func (m *BlockUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_BlockUpdate.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockUpdate proto.InternalMessageInfo - -func (m *BlockUpdate) GetChanges() *BlockChanges { - if m != nil { - return m.Changes - } - return nil -} - -type BlockCreate struct { - Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` -} - -func (m *BlockCreate) Reset() { *m = BlockCreate{} } -func (m *BlockCreate) String() string { return proto.CompactTextString(m) } -func (*BlockCreate) ProtoMessage() {} -func (*BlockCreate) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{8} -} -func (m *BlockCreate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockCreate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockCreate) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockCreate.Merge(m, src) -} -func (m *BlockCreate) XXX_Size() int { - return m.Size() -} -func (m *BlockCreate) XXX_DiscardUnknown() { - xxx_messageInfo_BlockCreate.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockCreate proto.InternalMessageInfo - -func (m *BlockCreate) GetBlock() *Block { - if m != nil { - return m.Block - } - return nil -} - -type BlockContentTextChange struct { - // Types that are valid to be assigned to Change: - // *BlockContentTextChange_Text - // *BlockContentTextChange_Style - // *BlockContentTextChange_Marks - // *BlockContentTextChange_Toggleable - // *BlockContentTextChange_MarkerType - // *BlockContentTextChange_Checkable - // *BlockContentTextChange_Checked - Change isBlockContentTextChange_Change `protobuf_oneof:"change"` -} - -func (m *BlockContentTextChange) Reset() { *m = BlockContentTextChange{} } -func (m *BlockContentTextChange) String() string { return proto.CompactTextString(m) } -func (*BlockContentTextChange) ProtoMessage() {} -func (*BlockContentTextChange) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{9} -} -func (m *BlockContentTextChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentTextChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentTextChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentTextChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentTextChange.Merge(m, src) -} -func (m *BlockContentTextChange) XXX_Size() int { - return m.Size() -} -func (m *BlockContentTextChange) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentTextChange.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentTextChange proto.InternalMessageInfo - -type isBlockContentTextChange_Change interface { - isBlockContentTextChange_Change() - MarshalTo([]byte) (int, error) - Size() int -} - -type BlockContentTextChange_Text struct { - Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"` -} -type BlockContentTextChange_Style struct { - Style BlockContentText_Style `protobuf:"varint,2,opt,name=style,proto3,enum=anytype.BlockContentText_Style,oneof" json:"style,omitempty"` -} -type BlockContentTextChange_Marks struct { - Marks *BlockContentText_Marks `protobuf:"bytes,3,opt,name=marks,proto3,oneof" json:"marks,omitempty"` -} -type BlockContentTextChange_Toggleable struct { - Toggleable bool `protobuf:"varint,4,opt,name=toggleable,proto3,oneof" json:"toggleable,omitempty"` -} -type BlockContentTextChange_MarkerType struct { - MarkerType BlockContentText_MarkerType `protobuf:"varint,5,opt,name=markerType,proto3,enum=anytype.BlockContentText_MarkerType,oneof" json:"markerType,omitempty"` -} -type BlockContentTextChange_Checkable struct { - Checkable bool `protobuf:"varint,6,opt,name=checkable,proto3,oneof" json:"checkable,omitempty"` -} -type BlockContentTextChange_Checked struct { - Checked bool `protobuf:"varint,7,opt,name=checked,proto3,oneof" json:"checked,omitempty"` -} - -func (*BlockContentTextChange_Text) isBlockContentTextChange_Change() {} -func (*BlockContentTextChange_Style) isBlockContentTextChange_Change() {} -func (*BlockContentTextChange_Marks) isBlockContentTextChange_Change() {} -func (*BlockContentTextChange_Toggleable) isBlockContentTextChange_Change() {} -func (*BlockContentTextChange_MarkerType) isBlockContentTextChange_Change() {} -func (*BlockContentTextChange_Checkable) isBlockContentTextChange_Change() {} -func (*BlockContentTextChange_Checked) isBlockContentTextChange_Change() {} - -func (m *BlockContentTextChange) GetChange() isBlockContentTextChange_Change { - if m != nil { - return m.Change - } - return nil -} - -func (m *BlockContentTextChange) GetText() string { - if x, ok := m.GetChange().(*BlockContentTextChange_Text); ok { - return x.Text - } - return "" -} - -func (m *BlockContentTextChange) GetStyle() BlockContentText_Style { - if x, ok := m.GetChange().(*BlockContentTextChange_Style); ok { - return x.Style - } - return BlockContentText_p -} - -func (m *BlockContentTextChange) GetMarks() *BlockContentText_Marks { - if x, ok := m.GetChange().(*BlockContentTextChange_Marks); ok { - return x.Marks - } - return nil -} - -func (m *BlockContentTextChange) GetToggleable() bool { - if x, ok := m.GetChange().(*BlockContentTextChange_Toggleable); ok { - return x.Toggleable - } - return false -} - -func (m *BlockContentTextChange) GetMarkerType() BlockContentText_MarkerType { - if x, ok := m.GetChange().(*BlockContentTextChange_MarkerType); ok { - return x.MarkerType - } - return BlockContentText_none -} - -func (m *BlockContentTextChange) GetCheckable() bool { - if x, ok := m.GetChange().(*BlockContentTextChange_Checkable); ok { - return x.Checkable - } - return false -} - -func (m *BlockContentTextChange) GetChecked() bool { - if x, ok := m.GetChange().(*BlockContentTextChange_Checked); ok { - return x.Checked - } - return false -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BlockContentTextChange) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BlockContentTextChange_Text)(nil), - (*BlockContentTextChange_Style)(nil), - (*BlockContentTextChange_Marks)(nil), - (*BlockContentTextChange_Toggleable)(nil), - (*BlockContentTextChange_MarkerType)(nil), - (*BlockContentTextChange_Checkable)(nil), - (*BlockContentTextChange_Checked)(nil), - } -} - -type BlockContentPageChange struct { - // Types that are valid to be assigned to Change: - // *BlockContentPageChange_Style - // *BlockContentPageChange_Structure - // *BlockContentPageChange_Blocks - Change isBlockContentPageChange_Change `protobuf_oneof:"change"` -} - -func (m *BlockContentPageChange) Reset() { *m = BlockContentPageChange{} } -func (m *BlockContentPageChange) String() string { return proto.CompactTextString(m) } -func (*BlockContentPageChange) ProtoMessage() {} -func (*BlockContentPageChange) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{10} -} -func (m *BlockContentPageChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentPageChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentPageChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentPageChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentPageChange.Merge(m, src) -} -func (m *BlockContentPageChange) XXX_Size() int { - return m.Size() -} -func (m *BlockContentPageChange) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentPageChange.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentPageChange proto.InternalMessageInfo - -type isBlockContentPageChange_Change interface { - isBlockContentPageChange_Change() - MarshalTo([]byte) (int, error) - Size() int -} - -type BlockContentPageChange_Style struct { - Style BlockContentPage_Style `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.BlockContentPage_Style,oneof" json:"style,omitempty"` -} -type BlockContentPageChange_Structure struct { - Structure *BlockConnectionsList `protobuf:"bytes,2,opt,name=structure,proto3,oneof" json:"structure,omitempty"` -} -type BlockContentPageChange_Blocks struct { - Blocks *BlocksList `protobuf:"bytes,3,opt,name=blocks,proto3,oneof" json:"blocks,omitempty"` -} - -func (*BlockContentPageChange_Style) isBlockContentPageChange_Change() {} -func (*BlockContentPageChange_Structure) isBlockContentPageChange_Change() {} -func (*BlockContentPageChange_Blocks) isBlockContentPageChange_Change() {} - -func (m *BlockContentPageChange) GetChange() isBlockContentPageChange_Change { - if m != nil { - return m.Change - } - return nil -} - -func (m *BlockContentPageChange) GetStyle() BlockContentPage_Style { - if x, ok := m.GetChange().(*BlockContentPageChange_Style); ok { - return x.Style - } - return BlockContentPage_EMPTY -} - -func (m *BlockContentPageChange) GetStructure() *BlockConnectionsList { - if x, ok := m.GetChange().(*BlockContentPageChange_Structure); ok { - return x.Structure - } - return nil -} - -func (m *BlockContentPageChange) GetBlocks() *BlocksList { - if x, ok := m.GetChange().(*BlockContentPageChange_Blocks); ok { - return x.Blocks - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BlockContentPageChange) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BlockContentPageChange_Style)(nil), - (*BlockContentPageChange_Structure)(nil), - (*BlockContentPageChange_Blocks)(nil), - } -} - -type BlockHeaderChange struct { - // Types that are valid to be assigned to Change: - // *BlockHeaderChange_Id - // *BlockHeaderChange_Type - // *BlockHeaderChange_Name - // *BlockHeaderChange_Icon - // *BlockHeaderChange_Permissions - Change isBlockHeaderChange_Change `protobuf_oneof:"change"` -} - -func (m *BlockHeaderChange) Reset() { *m = BlockHeaderChange{} } -func (m *BlockHeaderChange) String() string { return proto.CompactTextString(m) } -func (*BlockHeaderChange) ProtoMessage() {} -func (*BlockHeaderChange) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{11} -} -func (m *BlockHeaderChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockHeaderChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockHeaderChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockHeaderChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockHeaderChange.Merge(m, src) -} -func (m *BlockHeaderChange) XXX_Size() int { - return m.Size() -} -func (m *BlockHeaderChange) XXX_DiscardUnknown() { - xxx_messageInfo_BlockHeaderChange.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockHeaderChange proto.InternalMessageInfo - -type isBlockHeaderChange_Change interface { - isBlockHeaderChange_Change() - MarshalTo([]byte) (int, error) - Size() int -} - -type BlockHeaderChange_Id struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` -} -type BlockHeaderChange_Type struct { - Type BlockType `protobuf:"varint,2,opt,name=type,proto3,enum=anytype.BlockType,oneof" json:"type,omitempty"` -} -type BlockHeaderChange_Name struct { - Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` -} -type BlockHeaderChange_Icon struct { - Icon string `protobuf:"bytes,4,opt,name=icon,proto3,oneof" json:"icon,omitempty"` -} -type BlockHeaderChange_Permissions struct { - Permissions *BlockPermissions `protobuf:"bytes,5,opt,name=permissions,proto3,oneof" json:"permissions,omitempty"` -} - -func (*BlockHeaderChange_Id) isBlockHeaderChange_Change() {} -func (*BlockHeaderChange_Type) isBlockHeaderChange_Change() {} -func (*BlockHeaderChange_Name) isBlockHeaderChange_Change() {} -func (*BlockHeaderChange_Icon) isBlockHeaderChange_Change() {} -func (*BlockHeaderChange_Permissions) isBlockHeaderChange_Change() {} - -func (m *BlockHeaderChange) GetChange() isBlockHeaderChange_Change { - if m != nil { - return m.Change - } - return nil -} - -func (m *BlockHeaderChange) GetId() string { - if x, ok := m.GetChange().(*BlockHeaderChange_Id); ok { - return x.Id - } - return "" -} - -func (m *BlockHeaderChange) GetType() BlockType { - if x, ok := m.GetChange().(*BlockHeaderChange_Type); ok { - return x.Type - } - return BlockType_DASHBOARD -} - -func (m *BlockHeaderChange) GetName() string { - if x, ok := m.GetChange().(*BlockHeaderChange_Name); ok { - return x.Name - } - return "" -} - -func (m *BlockHeaderChange) GetIcon() string { - if x, ok := m.GetChange().(*BlockHeaderChange_Icon); ok { - return x.Icon - } - return "" -} - -func (m *BlockHeaderChange) GetPermissions() *BlockPermissions { - if x, ok := m.GetChange().(*BlockHeaderChange_Permissions); ok { - return x.Permissions - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BlockHeaderChange) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BlockHeaderChange_Id)(nil), - (*BlockHeaderChange_Type)(nil), - (*BlockHeaderChange_Name)(nil), - (*BlockHeaderChange_Icon)(nil), - (*BlockHeaderChange_Permissions)(nil), - } -} - -type BlockContentDashboardChange struct { - // Types that are valid to be assigned to Change: - // *BlockContentDashboardChange_Style - // *BlockContentDashboardChange_Structure - // *BlockContentDashboardChange_Headers - Change isBlockContentDashboardChange_Change `protobuf_oneof:"change"` -} - -func (m *BlockContentDashboardChange) Reset() { *m = BlockContentDashboardChange{} } -func (m *BlockContentDashboardChange) String() string { return proto.CompactTextString(m) } -func (*BlockContentDashboardChange) ProtoMessage() {} -func (*BlockContentDashboardChange) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{12} -} -func (m *BlockContentDashboardChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentDashboardChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentDashboardChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentDashboardChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentDashboardChange.Merge(m, src) -} -func (m *BlockContentDashboardChange) XXX_Size() int { - return m.Size() -} -func (m *BlockContentDashboardChange) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentDashboardChange.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentDashboardChange proto.InternalMessageInfo - -type isBlockContentDashboardChange_Change interface { - isBlockContentDashboardChange_Change() - MarshalTo([]byte) (int, error) - Size() int -} - -type BlockContentDashboardChange_Style struct { - Style BlockContentDashboard_Style `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.BlockContentDashboard_Style,oneof" json:"style,omitempty"` -} -type BlockContentDashboardChange_Structure struct { - Structure *BlockConnectionsList `protobuf:"bytes,2,opt,name=structure,proto3,oneof" json:"structure,omitempty"` -} -type BlockContentDashboardChange_Headers struct { - Headers *BlockHeadersList `protobuf:"bytes,3,opt,name=headers,proto3,oneof" json:"headers,omitempty"` -} - -func (*BlockContentDashboardChange_Style) isBlockContentDashboardChange_Change() {} -func (*BlockContentDashboardChange_Structure) isBlockContentDashboardChange_Change() {} -func (*BlockContentDashboardChange_Headers) isBlockContentDashboardChange_Change() {} - -func (m *BlockContentDashboardChange) GetChange() isBlockContentDashboardChange_Change { - if m != nil { - return m.Change - } - return nil -} - -func (m *BlockContentDashboardChange) GetStyle() BlockContentDashboard_Style { - if x, ok := m.GetChange().(*BlockContentDashboardChange_Style); ok { - return x.Style - } - return BlockContentDashboard_MAIN_SCREEN -} - -func (m *BlockContentDashboardChange) GetStructure() *BlockConnectionsList { - if x, ok := m.GetChange().(*BlockContentDashboardChange_Structure); ok { - return x.Structure - } - return nil -} - -func (m *BlockContentDashboardChange) GetHeaders() *BlockHeadersList { - if x, ok := m.GetChange().(*BlockContentDashboardChange_Headers); ok { - return x.Headers - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BlockContentDashboardChange) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BlockContentDashboardChange_Style)(nil), - (*BlockContentDashboardChange_Structure)(nil), - (*BlockContentDashboardChange_Headers)(nil), - } -} - -type BlockAtomicChange struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Types that are valid to be assigned to Change: - // *BlockAtomicChange_Text - // *BlockAtomicChange_BlockHeader - // *BlockAtomicChange_Page - // *BlockAtomicChange_Dashboard - Change isBlockAtomicChange_Change `protobuf_oneof:"change"` -} - -func (m *BlockAtomicChange) Reset() { *m = BlockAtomicChange{} } -func (m *BlockAtomicChange) String() string { return proto.CompactTextString(m) } -func (*BlockAtomicChange) ProtoMessage() {} -func (*BlockAtomicChange) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{13} -} -func (m *BlockAtomicChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockAtomicChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockAtomicChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockAtomicChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockAtomicChange.Merge(m, src) -} -func (m *BlockAtomicChange) XXX_Size() int { - return m.Size() -} -func (m *BlockAtomicChange) XXX_DiscardUnknown() { - xxx_messageInfo_BlockAtomicChange.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockAtomicChange proto.InternalMessageInfo - -type isBlockAtomicChange_Change interface { - isBlockAtomicChange_Change() - MarshalTo([]byte) (int, error) - Size() int -} - -type BlockAtomicChange_Text struct { - Text *BlockContentTextChange `protobuf:"bytes,2,opt,name=text,proto3,oneof" json:"text,omitempty"` -} -type BlockAtomicChange_BlockHeader struct { - BlockHeader *BlockHeaderChange `protobuf:"bytes,3,opt,name=blockHeader,proto3,oneof" json:"blockHeader,omitempty"` -} -type BlockAtomicChange_Page struct { - Page *BlockContentPageChange `protobuf:"bytes,4,opt,name=page,proto3,oneof" json:"page,omitempty"` -} -type BlockAtomicChange_Dashboard struct { - Dashboard *BlockContentDashboardChange `protobuf:"bytes,5,opt,name=dashboard,proto3,oneof" json:"dashboard,omitempty"` -} - -func (*BlockAtomicChange_Text) isBlockAtomicChange_Change() {} -func (*BlockAtomicChange_BlockHeader) isBlockAtomicChange_Change() {} -func (*BlockAtomicChange_Page) isBlockAtomicChange_Change() {} -func (*BlockAtomicChange_Dashboard) isBlockAtomicChange_Change() {} - -func (m *BlockAtomicChange) GetChange() isBlockAtomicChange_Change { - if m != nil { - return m.Change - } - return nil -} - -func (m *BlockAtomicChange) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *BlockAtomicChange) GetText() *BlockContentTextChange { - if x, ok := m.GetChange().(*BlockAtomicChange_Text); ok { - return x.Text - } - return nil -} - -func (m *BlockAtomicChange) GetBlockHeader() *BlockHeaderChange { - if x, ok := m.GetChange().(*BlockAtomicChange_BlockHeader); ok { - return x.BlockHeader - } - return nil -} - -func (m *BlockAtomicChange) GetPage() *BlockContentPageChange { - if x, ok := m.GetChange().(*BlockAtomicChange_Page); ok { - return x.Page - } - return nil -} - -func (m *BlockAtomicChange) GetDashboard() *BlockContentDashboardChange { - if x, ok := m.GetChange().(*BlockAtomicChange_Dashboard); ok { - return x.Dashboard - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BlockAtomicChange) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BlockAtomicChange_Text)(nil), - (*BlockAtomicChange_BlockHeader)(nil), - (*BlockAtomicChange_Page)(nil), - (*BlockAtomicChange_Dashboard)(nil), - } -} - -type BlockChanges struct { - Changes []*BlockAtomicChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` -} - -func (m *BlockChanges) Reset() { *m = BlockChanges{} } -func (m *BlockChanges) String() string { return proto.CompactTextString(m) } -func (*BlockChanges) ProtoMessage() {} -func (*BlockChanges) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{14} -} -func (m *BlockChanges) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockChanges.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockChanges) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockChanges.Merge(m, src) -} -func (m *BlockChanges) XXX_Size() int { - return m.Size() -} -func (m *BlockChanges) XXX_DiscardUnknown() { - xxx_messageInfo_BlockChanges.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockChanges proto.InternalMessageInfo - -func (m *BlockChanges) GetChanges() []*BlockAtomicChange { - if m != nil { - return m.Changes - } - return nil -} - -type Block struct { - Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // Types that are valid to be assigned to Content: - // *Block_Dashboard - // *Block_Page - // *Block_Dataview - // *Block_Text - // *Block_Media - Content isBlock_Content `protobuf_oneof:"content"` -} - -func (m *Block) Reset() { *m = Block{} } -func (m *Block) String() string { return proto.CompactTextString(m) } -func (*Block) ProtoMessage() {} -func (*Block) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{15} -} -func (m *Block) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Block.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Block) XXX_Merge(src proto.Message) { - xxx_messageInfo_Block.Merge(m, src) -} -func (m *Block) XXX_Size() int { - return m.Size() -} -func (m *Block) XXX_DiscardUnknown() { - xxx_messageInfo_Block.DiscardUnknown(m) -} - -var xxx_messageInfo_Block proto.InternalMessageInfo - -type isBlock_Content interface { - isBlock_Content() - MarshalTo([]byte) (int, error) - Size() int -} - -type Block_Dashboard struct { - Dashboard *BlockContentDashboard `protobuf:"bytes,11,opt,name=dashboard,proto3,oneof" json:"dashboard,omitempty"` -} -type Block_Page struct { - Page *BlockContentPage `protobuf:"bytes,12,opt,name=page,proto3,oneof" json:"page,omitempty"` -} -type Block_Dataview struct { - Dataview *BlockContentDataview `protobuf:"bytes,13,opt,name=dataview,proto3,oneof" json:"dataview,omitempty"` -} -type Block_Text struct { - Text *BlockContentText `protobuf:"bytes,14,opt,name=text,proto3,oneof" json:"text,omitempty"` -} -type Block_Media struct { - Media *BlockContentMedia `protobuf:"bytes,15,opt,name=media,proto3,oneof" json:"media,omitempty"` -} - -func (*Block_Dashboard) isBlock_Content() {} -func (*Block_Page) isBlock_Content() {} -func (*Block_Dataview) isBlock_Content() {} -func (*Block_Text) isBlock_Content() {} -func (*Block_Media) isBlock_Content() {} - -func (m *Block) GetContent() isBlock_Content { - if m != nil { - return m.Content - } - return nil -} - -func (m *Block) GetHeader() *BlockHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *Block) GetDashboard() *BlockContentDashboard { - if x, ok := m.GetContent().(*Block_Dashboard); ok { - return x.Dashboard - } - return nil -} - -func (m *Block) GetPage() *BlockContentPage { - if x, ok := m.GetContent().(*Block_Page); ok { - return x.Page - } - return nil -} - -func (m *Block) GetDataview() *BlockContentDataview { - if x, ok := m.GetContent().(*Block_Dataview); ok { - return x.Dataview - } - return nil -} - -func (m *Block) GetText() *BlockContentText { - if x, ok := m.GetContent().(*Block_Text); ok { - return x.Text - } - return nil -} - -func (m *Block) GetMedia() *BlockContentMedia { - if x, ok := m.GetContent().(*Block_Media); ok { - return x.Media - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Block) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Block_Dashboard)(nil), - (*Block_Page)(nil), - (*Block_Dataview)(nil), - (*Block_Text)(nil), - (*Block_Media)(nil), - } -} - -type BlockHeader struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type BlockType `protobuf:"varint,2,opt,name=type,proto3,enum=anytype.BlockType" json:"type,omitempty"` - Fields *Struct `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"` - Permissions *BlockPermissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` -} - -func (m *BlockHeader) Reset() { *m = BlockHeader{} } -func (m *BlockHeader) String() string { return proto.CompactTextString(m) } -func (*BlockHeader) ProtoMessage() {} -func (*BlockHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{16} -} -func (m *BlockHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockHeader.Merge(m, src) -} -func (m *BlockHeader) XXX_Size() int { - return m.Size() -} -func (m *BlockHeader) XXX_DiscardUnknown() { - xxx_messageInfo_BlockHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockHeader proto.InternalMessageInfo - -func (m *BlockHeader) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *BlockHeader) GetType() BlockType { - if m != nil { - return m.Type - } - return BlockType_DASHBOARD -} - -func (m *BlockHeader) GetFields() *Struct { - if m != nil { - return m.Fields - } - return nil -} - -func (m *BlockHeader) GetPermissions() *BlockPermissions { - if m != nil { - return m.Permissions - } - return nil -} - -type BlockPermissions struct { - Read bool `protobuf:"varint,1,opt,name=read,proto3" json:"read,omitempty"` - Edit bool `protobuf:"varint,2,opt,name=edit,proto3" json:"edit,omitempty"` - Remove bool `protobuf:"varint,3,opt,name=remove,proto3" json:"remove,omitempty"` - Drag bool `protobuf:"varint,4,opt,name=drag,proto3" json:"drag,omitempty"` - DropOn bool `protobuf:"varint,5,opt,name=dropOn,proto3" json:"dropOn,omitempty"` -} - -func (m *BlockPermissions) Reset() { *m = BlockPermissions{} } -func (m *BlockPermissions) String() string { return proto.CompactTextString(m) } -func (*BlockPermissions) ProtoMessage() {} -func (*BlockPermissions) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{17} -} -func (m *BlockPermissions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockPermissions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockPermissions) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockPermissions.Merge(m, src) -} -func (m *BlockPermissions) XXX_Size() int { - return m.Size() -} -func (m *BlockPermissions) XXX_DiscardUnknown() { - xxx_messageInfo_BlockPermissions.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockPermissions proto.InternalMessageInfo - -func (m *BlockPermissions) GetRead() bool { - if m != nil { - return m.Read - } - return false -} - -func (m *BlockPermissions) GetEdit() bool { - if m != nil { - return m.Edit - } - return false -} - -func (m *BlockPermissions) GetRemove() bool { - if m != nil { - return m.Remove - } - return false -} - -func (m *BlockPermissions) GetDrag() bool { - if m != nil { - return m.Drag - } - return false -} - -func (m *BlockPermissions) GetDropOn() bool { - if m != nil { - return m.DropOn - } - return false -} - -type BlockConnections struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Next string `protobuf:"bytes,2,opt,name=next,proto3" json:"next,omitempty"` - ColumnBottom string `protobuf:"bytes,3,opt,name=columnBottom,proto3" json:"columnBottom,omitempty"` - RowRight string `protobuf:"bytes,4,opt,name=rowRight,proto3" json:"rowRight,omitempty"` - Inner string `protobuf:"bytes,5,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *BlockConnections) Reset() { *m = BlockConnections{} } -func (m *BlockConnections) String() string { return proto.CompactTextString(m) } -func (*BlockConnections) ProtoMessage() {} -func (*BlockConnections) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{18} -} -func (m *BlockConnections) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockConnections) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockConnections.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockConnections) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockConnections.Merge(m, src) -} -func (m *BlockConnections) XXX_Size() int { - return m.Size() -} -func (m *BlockConnections) XXX_DiscardUnknown() { - xxx_messageInfo_BlockConnections.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockConnections proto.InternalMessageInfo - -func (m *BlockConnections) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *BlockConnections) GetNext() string { - if m != nil { - return m.Next - } - return "" -} - -func (m *BlockConnections) GetColumnBottom() string { - if m != nil { - return m.ColumnBottom - } - return "" -} - -func (m *BlockConnections) GetRowRight() string { - if m != nil { - return m.RowRight - } - return "" -} - -func (m *BlockConnections) GetInner() string { - if m != nil { - return m.Inner - } - return "" -} - -type BlockConnectionsList struct { - Structure []*BlockConnections `protobuf:"bytes,1,rep,name=structure,proto3" json:"structure,omitempty"` -} - -func (m *BlockConnectionsList) Reset() { *m = BlockConnectionsList{} } -func (m *BlockConnectionsList) String() string { return proto.CompactTextString(m) } -func (*BlockConnectionsList) ProtoMessage() {} -func (*BlockConnectionsList) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{19} -} -func (m *BlockConnectionsList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockConnectionsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockConnectionsList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockConnectionsList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockConnectionsList.Merge(m, src) -} -func (m *BlockConnectionsList) XXX_Size() int { - return m.Size() -} -func (m *BlockConnectionsList) XXX_DiscardUnknown() { - xxx_messageInfo_BlockConnectionsList.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockConnectionsList proto.InternalMessageInfo - -func (m *BlockConnectionsList) GetStructure() []*BlockConnections { - if m != nil { - return m.Structure - } - return nil -} - -type BlockHeadersList struct { - Headers []*BlockHeader `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (m *BlockHeadersList) Reset() { *m = BlockHeadersList{} } -func (m *BlockHeadersList) String() string { return proto.CompactTextString(m) } -func (*BlockHeadersList) ProtoMessage() {} -func (*BlockHeadersList) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{20} -} -func (m *BlockHeadersList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockHeadersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockHeadersList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockHeadersList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockHeadersList.Merge(m, src) -} -func (m *BlockHeadersList) XXX_Size() int { - return m.Size() -} -func (m *BlockHeadersList) XXX_DiscardUnknown() { - xxx_messageInfo_BlockHeadersList.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockHeadersList proto.InternalMessageInfo - -func (m *BlockHeadersList) GetHeaders() []*BlockHeader { - if m != nil { - return m.Headers - } - return nil -} - -type BlocksList struct { - Blocks []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"` -} - -func (m *BlocksList) Reset() { *m = BlocksList{} } -func (m *BlocksList) String() string { return proto.CompactTextString(m) } -func (*BlocksList) ProtoMessage() {} -func (*BlocksList) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{21} -} -func (m *BlocksList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlocksList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlocksList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlocksList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlocksList.Merge(m, src) -} -func (m *BlocksList) XXX_Size() int { - return m.Size() -} -func (m *BlocksList) XXX_DiscardUnknown() { - xxx_messageInfo_BlocksList.DiscardUnknown(m) -} - -var xxx_messageInfo_BlocksList proto.InternalMessageInfo - -func (m *BlocksList) GetBlocks() []*Block { - if m != nil { - return m.Blocks - } - return nil -} - -type BlockContentPage struct { - Style BlockContentPage_Style `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.BlockContentPage_Style" json:"style,omitempty"` - Structure *BlockConnectionsList `protobuf:"bytes,2,opt,name=structure,proto3" json:"structure,omitempty"` - Blocks *BlocksList `protobuf:"bytes,3,opt,name=blocks,proto3" json:"blocks,omitempty"` -} - -func (m *BlockContentPage) Reset() { *m = BlockContentPage{} } -func (m *BlockContentPage) String() string { return proto.CompactTextString(m) } -func (*BlockContentPage) ProtoMessage() {} -func (*BlockContentPage) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{22} -} -func (m *BlockContentPage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentPage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentPage) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentPage.Merge(m, src) -} -func (m *BlockContentPage) XXX_Size() int { - return m.Size() -} -func (m *BlockContentPage) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentPage.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentPage proto.InternalMessageInfo - -func (m *BlockContentPage) GetStyle() BlockContentPage_Style { - if m != nil { - return m.Style - } - return BlockContentPage_EMPTY -} - -func (m *BlockContentPage) GetStructure() *BlockConnectionsList { - if m != nil { - return m.Structure - } - return nil -} - -func (m *BlockContentPage) GetBlocks() *BlocksList { - if m != nil { - return m.Blocks - } - return nil -} - -type BlockContentDashboard struct { - Style BlockContentDashboard_Style `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.BlockContentDashboard_Style" json:"style,omitempty"` - Structure *BlockConnectionsList `protobuf:"bytes,2,opt,name=structure,proto3" json:"structure,omitempty"` - Headers *BlockHeadersList `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"` -} - -func (m *BlockContentDashboard) Reset() { *m = BlockContentDashboard{} } -func (m *BlockContentDashboard) String() string { return proto.CompactTextString(m) } -func (*BlockContentDashboard) ProtoMessage() {} -func (*BlockContentDashboard) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{23} -} -func (m *BlockContentDashboard) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentDashboard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentDashboard.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentDashboard) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentDashboard.Merge(m, src) -} -func (m *BlockContentDashboard) XXX_Size() int { - return m.Size() -} -func (m *BlockContentDashboard) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentDashboard.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentDashboard proto.InternalMessageInfo - -func (m *BlockContentDashboard) GetStyle() BlockContentDashboard_Style { - if m != nil { - return m.Style - } - return BlockContentDashboard_MAIN_SCREEN -} - -func (m *BlockContentDashboard) GetStructure() *BlockConnectionsList { - if m != nil { - return m.Structure - } - return nil -} - -func (m *BlockContentDashboard) GetHeaders() *BlockHeadersList { - if m != nil { - return m.Headers - } - return nil -} - -type BlockContentDataview struct { -} - -func (m *BlockContentDataview) Reset() { *m = BlockContentDataview{} } -func (m *BlockContentDataview) String() string { return proto.CompactTextString(m) } -func (*BlockContentDataview) ProtoMessage() {} -func (*BlockContentDataview) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{24} -} -func (m *BlockContentDataview) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentDataview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentDataview.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentDataview) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentDataview.Merge(m, src) -} -func (m *BlockContentDataview) XXX_Size() int { - return m.Size() -} -func (m *BlockContentDataview) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentDataview.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentDataview proto.InternalMessageInfo - -type BlockContentText struct { - Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` - Style BlockContentText_Style `protobuf:"varint,2,opt,name=style,proto3,enum=anytype.BlockContentText_Style" json:"style,omitempty"` - MarksList *BlockContentText_Marks `protobuf:"bytes,3,opt,name=marksList,proto3" json:"marksList,omitempty"` - Toggleable bool `protobuf:"varint,4,opt,name=toggleable,proto3" json:"toggleable,omitempty"` - MarkerType BlockContentText_MarkerType `protobuf:"varint,5,opt,name=markerType,proto3,enum=anytype.BlockContentText_MarkerType" json:"markerType,omitempty"` - Checkable bool `protobuf:"varint,6,opt,name=checkable,proto3" json:"checkable,omitempty"` - Checked bool `protobuf:"varint,7,opt,name=checked,proto3" json:"checked,omitempty"` -} - -func (m *BlockContentText) Reset() { *m = BlockContentText{} } -func (m *BlockContentText) String() string { return proto.CompactTextString(m) } -func (*BlockContentText) ProtoMessage() {} -func (*BlockContentText) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{25} -} -func (m *BlockContentText) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentText) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentText.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentText) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentText.Merge(m, src) -} -func (m *BlockContentText) XXX_Size() int { - return m.Size() -} -func (m *BlockContentText) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentText.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentText proto.InternalMessageInfo - -func (m *BlockContentText) GetText() string { - if m != nil { - return m.Text - } - return "" -} - -func (m *BlockContentText) GetStyle() BlockContentText_Style { - if m != nil { - return m.Style - } - return BlockContentText_p -} - -func (m *BlockContentText) GetMarksList() *BlockContentText_Marks { - if m != nil { - return m.MarksList - } - return nil -} - -func (m *BlockContentText) GetToggleable() bool { - if m != nil { - return m.Toggleable - } - return false -} - -func (m *BlockContentText) GetMarkerType() BlockContentText_MarkerType { - if m != nil { - return m.MarkerType - } - return BlockContentText_none -} - -func (m *BlockContentText) GetCheckable() bool { - if m != nil { - return m.Checkable - } - return false -} - -func (m *BlockContentText) GetChecked() bool { - if m != nil { - return m.Checked - } - return false -} - -type BlockContentText_Marks struct { - Marks []*BlockContentText_Mark `protobuf:"bytes,1,rep,name=marks,proto3" json:"marks,omitempty"` -} - -func (m *BlockContentText_Marks) Reset() { *m = BlockContentText_Marks{} } -func (m *BlockContentText_Marks) String() string { return proto.CompactTextString(m) } -func (*BlockContentText_Marks) ProtoMessage() {} -func (*BlockContentText_Marks) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{25, 0} -} -func (m *BlockContentText_Marks) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentText_Marks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentText_Marks.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentText_Marks) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentText_Marks.Merge(m, src) -} -func (m *BlockContentText_Marks) XXX_Size() int { - return m.Size() -} -func (m *BlockContentText_Marks) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentText_Marks.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentText_Marks proto.InternalMessageInfo - -func (m *BlockContentText_Marks) GetMarks() []*BlockContentText_Mark { - if m != nil { - return m.Marks - } - return nil -} - -type BlockContentText_Mark struct { - Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` - Type BlockContentText_Mark_Type `protobuf:"varint,2,opt,name=type,proto3,enum=anytype.BlockContentText_Mark_Type" json:"type,omitempty"` - Param string `protobuf:"bytes,3,opt,name=param,proto3" json:"param,omitempty"` -} - -func (m *BlockContentText_Mark) Reset() { *m = BlockContentText_Mark{} } -func (m *BlockContentText_Mark) String() string { return proto.CompactTextString(m) } -func (*BlockContentText_Mark) ProtoMessage() {} -func (*BlockContentText_Mark) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{25, 1} -} -func (m *BlockContentText_Mark) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentText_Mark) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentText_Mark.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentText_Mark) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentText_Mark.Merge(m, src) -} -func (m *BlockContentText_Mark) XXX_Size() int { - return m.Size() -} -func (m *BlockContentText_Mark) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentText_Mark.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentText_Mark proto.InternalMessageInfo - -func (m *BlockContentText_Mark) GetRange() *Range { - if m != nil { - return m.Range - } - return nil -} - -func (m *BlockContentText_Mark) GetType() BlockContentText_Mark_Type { - if m != nil { - return m.Type - } - return BlockContentText_Mark_STRIKETHROUGH -} - -func (m *BlockContentText_Mark) GetParam() string { - if m != nil { - return m.Param - } - return "" -} - -type BlockContentMedia struct { - Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` -} - -func (m *BlockContentMedia) Reset() { *m = BlockContentMedia{} } -func (m *BlockContentMedia) String() string { return proto.CompactTextString(m) } -func (*BlockContentMedia) ProtoMessage() {} -func (*BlockContentMedia) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{26} -} -func (m *BlockContentMedia) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockContentMedia) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockContentMedia.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockContentMedia) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockContentMedia.Merge(m, src) -} -func (m *BlockContentMedia) XXX_Size() int { - return m.Size() -} -func (m *BlockContentMedia) XXX_DiscardUnknown() { - xxx_messageInfo_BlockContentMedia.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockContentMedia proto.InternalMessageInfo - -func (m *BlockContentMedia) GetLink() string { - if m != nil { - return m.Link - } - return "" -} - -type Range struct { - From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` - To int32 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` -} - -func (m *Range) Reset() { *m = Range{} } -func (m *Range) String() string { return proto.CompactTextString(m) } -func (*Range) ProtoMessage() {} -func (*Range) Descriptor() ([]byte, []int) { - return fileDescriptor_8e550b1f5926e92d, []int{27} -} -func (m *Range) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Range.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Range) XXX_Merge(src proto.Message) { - xxx_messageInfo_Range.Merge(m, src) -} -func (m *Range) XXX_Size() int { - return m.Size() -} -func (m *Range) XXX_DiscardUnknown() { - xxx_messageInfo_Range.DiscardUnknown(m) -} - -var xxx_messageInfo_Range proto.InternalMessageInfo - -func (m *Range) GetFrom() int32 { - if m != nil { - return m.From - } - return 0 -} - -func (m *Range) GetTo() int32 { - if m != nil { - return m.To - } - return 0 -} - -func init() { - proto.RegisterEnum("anytype.BlockType", BlockType_name, BlockType_value) - proto.RegisterEnum("anytype.BlockOpenResponse_Error_Code", BlockOpenResponse_Error_Code_name, BlockOpenResponse_Error_Code_value) - proto.RegisterEnum("anytype.BlockCreateResponse_Error_Code", BlockCreateResponse_Error_Code_name, BlockCreateResponse_Error_Code_value) - proto.RegisterEnum("anytype.BlockUpdateResponse_Error_Code", BlockUpdateResponse_Error_Code_name, BlockUpdateResponse_Error_Code_value) - proto.RegisterEnum("anytype.BlockContentPage_Style", BlockContentPage_Style_name, BlockContentPage_Style_value) - proto.RegisterEnum("anytype.BlockContentDashboard_Style", BlockContentDashboard_Style_name, BlockContentDashboard_Style_value) - proto.RegisterEnum("anytype.BlockContentText_Style", BlockContentText_Style_name, BlockContentText_Style_value) - proto.RegisterEnum("anytype.BlockContentText_MarkerType", BlockContentText_MarkerType_name, BlockContentText_MarkerType_value) - proto.RegisterEnum("anytype.BlockContentText_Mark_Type", BlockContentText_Mark_Type_name, BlockContentText_Mark_Type_value) - proto.RegisterType((*BlockOpenRequest)(nil), "anytype.BlockOpenRequest") - proto.RegisterType((*BlockOpenResponse)(nil), "anytype.BlockOpenResponse") - proto.RegisterType((*BlockOpenResponse_Error)(nil), "anytype.BlockOpenResponse.Error") - proto.RegisterType((*BlockCreateRequest)(nil), "anytype.BlockCreateRequest") - proto.RegisterType((*BlockCreateResponse)(nil), "anytype.BlockCreateResponse") - proto.RegisterType((*BlockCreateResponse_Error)(nil), "anytype.BlockCreateResponse.Error") - proto.RegisterType((*BlockUpdateRequest)(nil), "anytype.BlockUpdateRequest") - proto.RegisterType((*BlockUpdateResponse)(nil), "anytype.BlockUpdateResponse") - proto.RegisterType((*BlockUpdateResponse_Error)(nil), "anytype.BlockUpdateResponse.Error") - proto.RegisterType((*BlockShow)(nil), "anytype.BlockShow") - proto.RegisterType((*BlockUpdate)(nil), "anytype.BlockUpdate") - proto.RegisterType((*BlockCreate)(nil), "anytype.BlockCreate") - proto.RegisterType((*BlockContentTextChange)(nil), "anytype.BlockContentTextChange") - proto.RegisterType((*BlockContentPageChange)(nil), "anytype.BlockContentPageChange") - proto.RegisterType((*BlockHeaderChange)(nil), "anytype.BlockHeaderChange") - proto.RegisterType((*BlockContentDashboardChange)(nil), "anytype.BlockContentDashboardChange") - proto.RegisterType((*BlockAtomicChange)(nil), "anytype.BlockAtomicChange") - proto.RegisterType((*BlockChanges)(nil), "anytype.BlockChanges") - proto.RegisterType((*Block)(nil), "anytype.Block") - proto.RegisterType((*BlockHeader)(nil), "anytype.BlockHeader") - proto.RegisterType((*BlockPermissions)(nil), "anytype.BlockPermissions") - proto.RegisterType((*BlockConnections)(nil), "anytype.BlockConnections") - proto.RegisterType((*BlockConnectionsList)(nil), "anytype.BlockConnectionsList") - proto.RegisterType((*BlockHeadersList)(nil), "anytype.BlockHeadersList") - proto.RegisterType((*BlocksList)(nil), "anytype.BlocksList") - proto.RegisterType((*BlockContentPage)(nil), "anytype.BlockContentPage") - proto.RegisterType((*BlockContentDashboard)(nil), "anytype.BlockContentDashboard") - proto.RegisterType((*BlockContentDataview)(nil), "anytype.BlockContentDataview") - proto.RegisterType((*BlockContentText)(nil), "anytype.BlockContentText") - proto.RegisterType((*BlockContentText_Marks)(nil), "anytype.BlockContentText.Marks") - proto.RegisterType((*BlockContentText_Mark)(nil), "anytype.BlockContentText.Mark") - proto.RegisterType((*BlockContentMedia)(nil), "anytype.BlockContentMedia") - proto.RegisterType((*Range)(nil), "anytype.Range") -} - -func init() { proto.RegisterFile("block.proto", fileDescriptor_8e550b1f5926e92d) } - -var fileDescriptor_8e550b1f5926e92d = []byte{ - // 1633 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0x13, 0xd7, - 0x16, 0xf7, 0x4c, 0x3c, 0x8e, 0x7d, 0x9c, 0x84, 0xe1, 0x12, 0x90, 0xf1, 0xe3, 0xf9, 0x45, 0xf3, - 0x28, 0xa0, 0xd2, 0x1a, 0x91, 0x3f, 0x50, 0x1a, 0x40, 0xb2, 0xe3, 0x01, 0x5b, 0x49, 0xec, 0xe8, - 0xda, 0x81, 0xd2, 0x45, 0xd1, 0xc4, 0x73, 0x49, 0x46, 0xb1, 0x67, 0xcc, 0x78, 0x02, 0x64, 0xd3, - 0x4f, 0xd0, 0x45, 0x97, 0x55, 0x17, 0x95, 0xba, 0xe6, 0x6b, 0xb0, 0x68, 0x77, 0x48, 0xdd, 0x54, - 0xea, 0xa2, 0x15, 0x6c, 0xba, 0xe8, 0x87, 0xa8, 0xee, 0x9f, 0x99, 0xb9, 0x93, 0x18, 0x27, 0x41, - 0xb0, 0xca, 0xdc, 0x7b, 0xcf, 0xb9, 0xe7, 0x9c, 0xdf, 0x3d, 0xe7, 0x77, 0x8e, 0x03, 0xf9, 0xad, - 0x9e, 0xd7, 0xdd, 0x2d, 0x0f, 0x7c, 0x2f, 0xf0, 0xd0, 0xa4, 0xe5, 0xee, 0x07, 0xfb, 0x03, 0x52, - 0x9c, 0x1a, 0x06, 0xfe, 0x5e, 0x37, 0xe0, 0xdb, 0x86, 0x01, 0x7a, 0x95, 0x4a, 0xb5, 0x06, 0xc4, - 0xc5, 0xe4, 0xe9, 0x1e, 0x19, 0x06, 0x68, 0x06, 0x54, 0xc7, 0x2e, 0x28, 0x73, 0xca, 0x95, 0x1c, - 0x56, 0x1d, 0xdb, 0xf8, 0x49, 0x85, 0xd3, 0x92, 0xd0, 0x70, 0xe0, 0xb9, 0x43, 0x82, 0x6e, 0x80, - 0x46, 0x7c, 0xdf, 0xf3, 0x99, 0x60, 0x7e, 0x7e, 0xae, 0x2c, 0x0c, 0x94, 0x0f, 0x89, 0x96, 0x4d, - 0x2a, 0x87, 0xb9, 0x38, 0xba, 0x21, 0xfc, 0xaa, 0x13, 0xcb, 0x26, 0x7e, 0x41, 0x65, 0xda, 0xb3, - 0x49, 0x6d, 0x7e, 0x86, 0x65, 0xc1, 0xe2, 0x0f, 0x0a, 0x68, 0xec, 0x22, 0x74, 0x0b, 0xd2, 0x5d, - 0xcf, 0x26, 0xcc, 0xf0, 0xcc, 0xfc, 0x27, 0x47, 0x19, 0x2e, 0xaf, 0x78, 0x36, 0xc1, 0x4c, 0x05, - 0xcd, 0x41, 0xde, 0x26, 0xc3, 0xae, 0xef, 0x0c, 0x02, 0xc7, 0x73, 0x99, 0xf1, 0x1c, 0x96, 0xb7, - 0x8c, 0x79, 0x48, 0x53, 0x79, 0x94, 0x85, 0x74, 0x73, 0x73, 0x6d, 0x4d, 0x4f, 0xa1, 0xd3, 0x30, - 0xbd, 0xd9, 0x5c, 0x6d, 0xb6, 0x1e, 0x36, 0x1f, 0x9b, 0x18, 0xb7, 0xb0, 0xae, 0xa0, 0x69, 0xc8, - 0x55, 0x2b, 0xb5, 0xc7, 0x8d, 0xe6, 0xc6, 0x66, 0x47, 0x57, 0x8d, 0xdb, 0x80, 0x98, 0xed, 0x15, - 0x9f, 0x58, 0x01, 0x09, 0x61, 0xbc, 0x04, 0x69, 0xea, 0x96, 0x70, 0x13, 0x25, 0xdd, 0xec, 0xec, - 0x0f, 0x08, 0x66, 0xe7, 0xc6, 0x3f, 0x0a, 0x9c, 0x49, 0xa8, 0x0b, 0x80, 0xbf, 0x48, 0x02, 0x6c, - 0x24, 0x2f, 0x48, 0x0a, 0x27, 0x20, 0x2e, 0xfe, 0x18, 0x41, 0xb5, 0x9c, 0x80, 0xea, 0xf2, 0xd1, - 0x57, 0x7c, 0x7c, 0xb0, 0x4c, 0x01, 0xd6, 0xe6, 0xc0, 0x96, 0xc0, 0xba, 0x06, 0x93, 0xdd, 0x1d, - 0xcb, 0xdd, 0x26, 0x43, 0x11, 0xee, 0xd9, 0x03, 0xbe, 0xf2, 0x43, 0x1c, 0x4a, 0xc5, 0xa8, 0x85, - 0xf7, 0x1c, 0x0b, 0xb5, 0xa4, 0xf0, 0x7b, 0xa1, 0x36, 0xea, 0x8a, 0x8f, 0x8f, 0xda, 0x75, 0xc8, - 0x31, 0xeb, 0xed, 0x1d, 0xef, 0x39, 0xba, 0x08, 0x1a, 0xab, 0x0c, 0x11, 0xe3, 0x4c, 0xd2, 0x41, - 0xcc, 0x0f, 0x8d, 0xbb, 0x90, 0x97, 0x1c, 0x3e, 0x39, 0xc2, 0x0b, 0x42, 0x9f, 0xa7, 0xc9, 0x31, - 0x8d, 0xbe, 0x56, 0xe1, 0x1c, 0xd7, 0xf2, 0xdc, 0x80, 0xb8, 0x41, 0x87, 0xbc, 0x08, 0xf8, 0xcd, - 0x68, 0x16, 0xd2, 0x01, 0x79, 0x11, 0x70, 0x62, 0xa9, 0xa7, 0x30, 0x5b, 0xa1, 0x9b, 0xa0, 0x0d, - 0x83, 0xfd, 0x1e, 0x61, 0x40, 0xcd, 0xcc, 0xff, 0xef, 0x80, 0x53, 0xf1, 0x2d, 0xe5, 0x36, 0x15, - 0xab, 0xa7, 0x30, 0x97, 0xa7, 0x8a, 0x7d, 0xcb, 0xdf, 0x1d, 0x16, 0x26, 0x98, 0x3f, 0x63, 0x14, - 0xd7, 0xa9, 0x18, 0x55, 0x64, 0xf2, 0x68, 0x0e, 0x20, 0xf0, 0xb6, 0xb7, 0x7b, 0xc4, 0xda, 0xea, - 0x91, 0x42, 0x7a, 0x4e, 0xb9, 0x92, 0xad, 0xa7, 0xb0, 0xb4, 0x87, 0xee, 0x01, 0x50, 0x51, 0xe2, - 0xd3, 0x2a, 0x2d, 0x68, 0xcc, 0xb1, 0x8b, 0xe3, 0xef, 0xe7, 0xb2, 0xf4, 0x9e, 0x58, 0x13, 0x95, - 0x20, 0xd7, 0xdd, 0x21, 0xdd, 0x5d, 0x66, 0x28, 0x23, 0x0c, 0xc5, 0x5b, 0xa8, 0x48, 0x9f, 0x84, - 0x74, 0x77, 0x89, 0x5d, 0x98, 0x14, 0xa7, 0xe1, 0x46, 0x35, 0x0b, 0x19, 0xfe, 0x10, 0xc6, 0xaf, - 0x4a, 0x12, 0xd2, 0x0d, 0x6b, 0x9b, 0x08, 0x48, 0x23, 0xf0, 0x94, 0x31, 0xe0, 0x51, 0xf9, 0x83, - 0xe0, 0xdd, 0x81, 0x1c, 0x6f, 0x03, 0x7b, 0x3e, 0x11, 0x14, 0xfc, 0xdf, 0x43, 0xca, 0x2e, 0xe9, - 0xd2, 0x7c, 0x1d, 0xae, 0x39, 0xc3, 0x80, 0x3a, 0x1e, 0x69, 0xa0, 0xcf, 0x21, 0xc3, 0x9e, 0x3b, - 0x04, 0xff, 0x4c, 0x52, 0x37, 0xd4, 0x10, 0x42, 0x52, 0x2c, 0xaf, 0x14, 0xd1, 0x4a, 0x38, 0xa9, - 0x8b, 0x30, 0xf4, 0xb8, 0xe1, 0xd4, 0x53, 0xb4, 0xe5, 0xa0, 0x2b, 0x82, 0x3b, 0xd5, 0x77, 0x71, - 0x27, 0xcb, 0x1f, 0x8a, 0xf1, 0x2c, 0xa4, 0x5d, 0xab, 0x4f, 0x98, 0x23, 0x2c, 0xab, 0xe8, 0x8a, - 0xee, 0x3a, 0x5d, 0xcf, 0x65, 0xaf, 0xcb, 0x76, 0xe9, 0x0a, 0xdd, 0x81, 0xfc, 0x80, 0xf8, 0x7d, - 0x67, 0x38, 0xa4, 0x61, 0xb1, 0x87, 0xcd, 0xcf, 0x9f, 0x4f, 0x5e, 0xbe, 0x11, 0x0b, 0xd4, 0x53, - 0x58, 0x96, 0x97, 0xc2, 0xf8, 0x43, 0x81, 0xff, 0xc8, 0x10, 0xd7, 0xac, 0xe1, 0xce, 0x96, 0x67, - 0xf9, 0xb6, 0x08, 0xe8, 0x76, 0xf2, 0x5d, 0x46, 0xe7, 0x4e, 0xa4, 0xf4, 0x81, 0x1f, 0x67, 0x09, - 0x26, 0x77, 0x18, 0xba, 0xe1, 0xeb, 0x9c, 0x1f, 0xd5, 0x5c, 0x43, 0xc5, 0x50, 0x56, 0x8a, 0xee, - 0xe7, 0xb0, 0xdf, 0x57, 0x02, 0xaf, 0xef, 0x74, 0x45, 0x4c, 0x07, 0xa6, 0x02, 0xb4, 0x24, 0xca, - 0x59, 0x3d, 0xa2, 0xfc, 0xb8, 0x7a, 0x54, 0xef, 0x77, 0x93, 0xed, 0x9f, 0x7b, 0x58, 0x1c, 0xe5, - 0x61, 0xa4, 0x28, 0x2b, 0x50, 0xb3, 0x03, 0x6b, 0x9b, 0xd7, 0x6d, 0x7e, 0x4c, 0xc6, 0xc7, 0x66, - 0xa9, 0x38, 0xaa, 0x41, 0xce, 0x0e, 0xf1, 0x16, 0x0f, 0x7f, 0xc4, 0xab, 0x44, 0x17, 0xc4, 0x8a, - 0x12, 0x46, 0x35, 0x98, 0x92, 0x59, 0x13, 0x2d, 0xca, 0xec, 0x3a, 0x71, 0x38, 0x24, 0x19, 0xca, - 0x98, 0x62, 0x7f, 0x53, 0x41, 0x63, 0xc7, 0xe8, 0x33, 0xc8, 0xf0, 0x87, 0x10, 0xf4, 0x3a, 0x7a, - 0x20, 0x12, 0x32, 0xe8, 0xae, 0x1c, 0x4d, 0x9e, 0x29, 0x94, 0xc6, 0x47, 0x93, 0x88, 0x03, 0x5d, - 0x13, 0x20, 0x4e, 0x8d, 0xca, 0x0f, 0x09, 0xc4, 0x08, 0xbe, 0x65, 0xc8, 0xda, 0x56, 0x60, 0x3d, - 0x73, 0xc8, 0xf3, 0xc2, 0xf4, 0x3b, 0x32, 0x92, 0xdb, 0xe3, 0x42, 0xf5, 0x14, 0x8e, 0x14, 0xa8, - 0x35, 0x96, 0x29, 0x33, 0x63, 0xac, 0xd1, 0x4c, 0x89, 0x72, 0x64, 0x1e, 0xb4, 0x3e, 0xb1, 0x1d, - 0xab, 0x70, 0x6a, 0x54, 0x76, 0x08, 0x8d, 0x75, 0x2a, 0xc1, 0x58, 0x9d, 0x7e, 0x54, 0x73, 0x30, - 0xd9, 0xe5, 0x07, 0xc6, 0x4b, 0x45, 0x74, 0x2e, 0x91, 0x32, 0x07, 0x33, 0xf7, 0xd2, 0x51, 0xe4, - 0x22, 0xa8, 0xe5, 0x32, 0x64, 0x9e, 0x38, 0xa4, 0x67, 0x87, 0x75, 0x74, 0x2a, 0x92, 0x6c, 0xb3, - 0x62, 0xc3, 0xe2, 0x18, 0x2d, 0x27, 0x79, 0x25, 0x7d, 0x04, 0xaf, 0x24, 0x58, 0xc5, 0xf8, 0x56, - 0x4c, 0xe0, 0x92, 0x00, 0x42, 0x90, 0xf6, 0x89, 0xc5, 0x7d, 0xce, 0x62, 0xf6, 0x4d, 0xf7, 0x88, - 0xed, 0xf0, 0x7a, 0xcb, 0x62, 0xf6, 0x8d, 0xce, 0x41, 0xc6, 0x27, 0x7d, 0xef, 0x19, 0xa7, 0xbf, - 0x2c, 0x16, 0x2b, 0x2a, 0x6b, 0xfb, 0xd6, 0x36, 0x6f, 0x6e, 0x98, 0x7d, 0x53, 0x59, 0xdb, 0xf7, - 0x06, 0x2d, 0x97, 0xa5, 0x7f, 0x16, 0x8b, 0x95, 0xf1, 0x9d, 0x22, 0x1c, 0x90, 0x48, 0xe5, 0x10, - 0x64, 0x08, 0xd2, 0x6e, 0x58, 0xec, 0x39, 0xcc, 0xbe, 0x91, 0x01, 0x53, 0x5d, 0xaf, 0xb7, 0xd7, - 0x77, 0xab, 0x5e, 0x10, 0x78, 0x7d, 0xce, 0xc0, 0x38, 0xb1, 0x87, 0x8a, 0x90, 0xf5, 0xbd, 0xe7, - 0xd8, 0xd9, 0xde, 0x09, 0x38, 0x17, 0xe3, 0x68, 0x8d, 0x66, 0x41, 0x73, 0x5c, 0x97, 0xf8, 0xcc, - 0x9f, 0x1c, 0xe6, 0x0b, 0xa3, 0x05, 0xb3, 0xa3, 0x28, 0x0e, 0xdd, 0x94, 0x49, 0x91, 0x97, 0xd8, - 0xf9, 0x77, 0x92, 0xa2, 0x44, 0x87, 0x46, 0x55, 0x84, 0x27, 0xd1, 0x1e, 0x2a, 0xc7, 0x14, 0xc9, - 0xaf, 0x1a, 0x5d, 0x6e, 0xa1, 0x90, 0xb1, 0x08, 0x10, 0x37, 0x36, 0x74, 0x29, 0xea, 0x7e, 0x5c, - 0xf9, 0xe0, 0x28, 0x24, 0x4e, 0x8d, 0xbf, 0x25, 0x64, 0xc3, 0x8a, 0x42, 0x4b, 0x27, 0x6b, 0xd9, - 0x61, 0x4f, 0x58, 0x3e, 0x69, 0x4f, 0x90, 0x3b, 0xc2, 0xd5, 0x63, 0xb4, 0xeb, 0xc8, 0xeb, 0x05, - 0xd0, 0x98, 0x65, 0x94, 0x03, 0xcd, 0x5c, 0xdf, 0xe8, 0x3c, 0xd2, 0x53, 0x74, 0x52, 0xed, 0x54, - 0xda, 0xab, 0xba, 0x82, 0xa6, 0x20, 0x5b, 0x6d, 0xb5, 0x56, 0xd7, 0x2b, 0x78, 0x55, 0x57, 0xd1, - 0x24, 0x4c, 0xb4, 0xcd, 0x8e, 0x3e, 0x61, 0xfc, 0xa9, 0xc0, 0xd9, 0x91, 0xbc, 0x83, 0xbe, 0x7c, - 0x8f, 0x56, 0xf8, 0x41, 0x82, 0x5e, 0x38, 0x7e, 0x1b, 0x8c, 0x1f, 0xba, 0x10, 0x06, 0x7f, 0x0a, - 0xf2, 0xeb, 0x95, 0x46, 0xf3, 0x71, 0x7b, 0x05, 0x9b, 0x66, 0x53, 0x4f, 0x19, 0xe7, 0xe2, 0xbc, - 0x94, 0x89, 0xce, 0x78, 0xa9, 0x25, 0x1f, 0x99, 0x12, 0x19, 0x2d, 0x97, 0x78, 0xd4, 0x15, 0xa4, - 0xb6, 0x74, 0xb2, 0x41, 0x57, 0x1a, 0x06, 0xd8, 0xd8, 0x4a, 0xfd, 0x3c, 0xe6, 0xa8, 0x8b, 0x63, - 0x0d, 0x54, 0x3a, 0x3c, 0xec, 0x26, 0x46, 0xdd, 0xda, 0xfb, 0x8e, 0xba, 0x89, 0x41, 0xf7, 0xc2, - 0xa1, 0x41, 0x57, 0x1e, 0x73, 0x0b, 0x07, 0xc6, 0xdc, 0x68, 0xc8, 0x2d, 0xde, 0x01, 0x8d, 0x79, - 0x8c, 0x16, 0xc3, 0x61, 0x9e, 0x57, 0x54, 0x69, 0xbc, 0x07, 0x62, 0x92, 0x2f, 0xbe, 0x52, 0x20, - 0x4d, 0xd7, 0xf4, 0xb7, 0x89, 0x4f, 0x3b, 0xea, 0xa1, 0xdf, 0x26, 0x98, 0xf5, 0x5b, 0x7e, 0x88, - 0x6e, 0x26, 0x78, 0xff, 0xff, 0xe3, 0x6d, 0x94, 0xa5, 0x46, 0x30, 0x0b, 0xda, 0xc0, 0xf2, 0xad, - 0x90, 0xe2, 0xf8, 0xc2, 0xb8, 0x0f, 0x69, 0x16, 0xfc, 0x69, 0x98, 0x6e, 0x77, 0x70, 0x63, 0xd5, - 0xec, 0xd4, 0x71, 0x6b, 0xf3, 0x7e, 0x5d, 0x4f, 0xd1, 0x2a, 0x59, 0x35, 0x1f, 0x55, 0x5b, 0x15, - 0x5c, 0xd3, 0x15, 0x04, 0x90, 0x69, 0x74, 0x2a, 0x6b, 0x8d, 0x15, 0x5d, 0xa5, 0x95, 0x54, 0x6d, - 0xad, 0xd5, 0xf4, 0x09, 0xfa, 0xb5, 0xd6, 0x68, 0xae, 0xea, 0x69, 0xe3, 0x56, 0x98, 0x74, 0x1a, - 0x28, 0x03, 0x3d, 0x85, 0x32, 0xa0, 0xee, 0x5c, 0xd7, 0x15, 0xf6, 0x77, 0x5e, 0x57, 0xd9, 0xdf, - 0x05, 0x7d, 0x82, 0xfd, 0x5d, 0xd4, 0xd3, 0xb4, 0x30, 0x9f, 0xee, 0x79, 0x01, 0xd1, 0x35, 0xa3, - 0x0c, 0x10, 0x3f, 0x09, 0xbd, 0xd2, 0xf5, 0x5c, 0xa2, 0xa7, 0xa8, 0x49, 0x77, 0xaf, 0xbf, 0x45, - 0x7c, 0x6e, 0x7e, 0x6b, 0xaf, 0xd7, 0x23, 0x81, 0xae, 0x1a, 0x97, 0xc5, 0x64, 0x27, 0xf7, 0x50, - 0x9a, 0xad, 0x3d, 0xc7, 0xdd, 0x0d, 0xb3, 0x95, 0x7e, 0x1b, 0x57, 0x41, 0x63, 0xd8, 0xd1, 0xc3, - 0x27, 0xbe, 0xd7, 0x67, 0x87, 0x1a, 0x66, 0xdf, 0xb4, 0x3b, 0x04, 0x1e, 0x83, 0x51, 0xc3, 0x6a, - 0xe0, 0x7d, 0xfa, 0x8d, 0xf8, 0x71, 0xca, 0x9c, 0x98, 0x86, 0x5c, 0xad, 0xd2, 0xae, 0xf3, 0xe0, - 0x19, 0x75, 0x6c, 0x54, 0xee, 0x9b, 0x9c, 0x3a, 0x6a, 0x95, 0x4e, 0xe5, 0x41, 0xc3, 0x7c, 0xc8, - 0x81, 0xe8, 0x98, 0x5f, 0x75, 0x38, 0x10, 0xf7, 0x1a, 0x6b, 0xa6, 0x9e, 0x46, 0x79, 0x98, 0xdc, - 0x68, 0xac, 0x74, 0x36, 0xb1, 0xa9, 0x6b, 0x34, 0xca, 0x07, 0x8d, 0x9a, 0xd9, 0xd2, 0x33, 0xd5, - 0x0b, 0xbf, 0xbc, 0x29, 0x29, 0xaf, 0xdf, 0x94, 0x94, 0xbf, 0xde, 0x94, 0x94, 0xef, 0xdf, 0x96, - 0x52, 0xaf, 0xdf, 0x96, 0x52, 0xbf, 0xbf, 0x2d, 0xa5, 0xbe, 0x56, 0x07, 0x5b, 0x5b, 0x19, 0xf6, - 0x9f, 0xac, 0x85, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x79, 0x56, 0x82, 0xe1, 0xef, 0x12, 0x00, - 0x00, -} - -func (m *BlockOpenRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockOpenRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockOpenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockOpenResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockOpenResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockOpenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockHeader != nil { - { - size, err := m.BlockHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockOpenResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockOpenResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockOpenResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockCreateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockCreateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Type != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockCreateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockCreateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockCreateResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockCreateResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockCreateResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockUpdateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockUpdateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Changes != nil { - { - size, err := m.Changes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockUpdateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockUpdateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockUpdateResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockUpdateResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockUpdateResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockShow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockShow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockUpdate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Changes != nil { - { - size, err := m.Changes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockCreate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockCreate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockContentTextChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentTextChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Change != nil { - { - size := m.Change.Size() - i -= size - if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *BlockContentTextChange_Text) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_Text) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Text))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *BlockContentTextChange_Style) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_Style) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintBlock(dAtA, i, uint64(m.Style)) - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *BlockContentTextChange_Marks) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_Marks) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Marks != nil { - { - size, err := m.Marks.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *BlockContentTextChange_Toggleable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_Toggleable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.Toggleable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - return len(dAtA) - i, nil -} -func (m *BlockContentTextChange_MarkerType) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_MarkerType) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintBlock(dAtA, i, uint64(m.MarkerType)) - i-- - dAtA[i] = 0x28 - return len(dAtA) - i, nil -} -func (m *BlockContentTextChange_Checkable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_Checkable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.Checkable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *BlockContentTextChange_Checked) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentTextChange_Checked) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.Checked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - return len(dAtA) - i, nil -} -func (m *BlockContentPageChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentPageChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentPageChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Change != nil { - { - size := m.Change.Size() - i -= size - if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *BlockContentPageChange_Style) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentPageChange_Style) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintBlock(dAtA, i, uint64(m.Style)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *BlockContentPageChange_Structure) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentPageChange_Structure) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Structure != nil { - { - size, err := m.Structure.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *BlockContentPageChange_Blocks) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentPageChange_Blocks) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Blocks != nil { - { - size, err := m.Blocks.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *BlockHeaderChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockHeaderChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Change != nil { - { - size := m.Change.Size() - i -= size - if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *BlockHeaderChange_Id) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderChange_Id) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *BlockHeaderChange_Type) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderChange_Type) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintBlock(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *BlockHeaderChange_Name) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderChange_Name) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *BlockHeaderChange_Icon) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderChange_Icon) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Icon) - copy(dAtA[i:], m.Icon) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Icon))) - i-- - dAtA[i] = 0x22 - return len(dAtA) - i, nil -} -func (m *BlockHeaderChange_Permissions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeaderChange_Permissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Permissions != nil { - { - size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *BlockContentDashboardChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentDashboardChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentDashboardChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Change != nil { - { - size := m.Change.Size() - i -= size - if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *BlockContentDashboardChange_Style) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentDashboardChange_Style) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintBlock(dAtA, i, uint64(m.Style)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *BlockContentDashboardChange_Structure) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentDashboardChange_Structure) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Structure != nil { - { - size, err := m.Structure.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *BlockContentDashboardChange_Headers) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentDashboardChange_Headers) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Headers != nil { - { - size, err := m.Headers.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *BlockAtomicChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockAtomicChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockAtomicChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Change != nil { - { - size := m.Change.Size() - i -= size - if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockAtomicChange_Text) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockAtomicChange_Text) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Text != nil { - { - size, err := m.Text.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *BlockAtomicChange_BlockHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockAtomicChange_BlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BlockHeader != nil { - { - size, err := m.BlockHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *BlockAtomicChange_Page) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockAtomicChange_Page) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Page != nil { - { - size, err := m.Page.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *BlockAtomicChange_Dashboard) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockAtomicChange_Dashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Dashboard != nil { - { - size, err := m.Dashboard.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *BlockChanges) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockChanges) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Block) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Block) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Content != nil { - { - size := m.Content.Size() - i -= size - if _, err := m.Content.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Block_Dashboard) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block_Dashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Dashboard != nil { - { - size, err := m.Dashboard.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *Block_Page) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block_Page) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Page != nil { - { - size, err := m.Page.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - return len(dAtA) - i, nil -} -func (m *Block_Dataview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block_Dataview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Dataview != nil { - { - size, err := m.Dataview.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - return len(dAtA) - i, nil -} -func (m *Block_Text) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block_Text) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Text != nil { - { - size, err := m.Text.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - return len(dAtA) - i, nil -} -func (m *Block_Media) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block_Media) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Media != nil { - { - size, err := m.Media.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - return len(dAtA) - i, nil -} -func (m *BlockHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Permissions != nil { - { - size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Fields != nil { - { - size, err := m.Fields.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Type != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockPermissions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockPermissions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DropOn { - i-- - if m.DropOn { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Drag { - i-- - if m.Drag { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Remove { - i-- - if m.Remove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Edit { - i-- - if m.Edit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Read { - i-- - if m.Read { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockConnections) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockConnections) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockConnections) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0x2a - } - if len(m.RowRight) > 0 { - i -= len(m.RowRight) - copy(dAtA[i:], m.RowRight) - i = encodeVarintBlock(dAtA, i, uint64(len(m.RowRight))) - i-- - dAtA[i] = 0x22 - } - if len(m.ColumnBottom) > 0 { - i -= len(m.ColumnBottom) - copy(dAtA[i:], m.ColumnBottom) - i = encodeVarintBlock(dAtA, i, uint64(len(m.ColumnBottom))) - i-- - dAtA[i] = 0x1a - } - if len(m.Next) > 0 { - i -= len(m.Next) - copy(dAtA[i:], m.Next) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Next))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockConnectionsList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockConnectionsList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockConnectionsList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Structure) > 0 { - for iNdEx := len(m.Structure) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Structure[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BlockHeadersList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockHeadersList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockHeadersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Headers) > 0 { - for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Headers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BlocksList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlocksList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlocksList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Blocks) > 0 { - for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BlockContentPage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentPage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentPage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Blocks != nil { - { - size, err := m.Blocks.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Structure != nil { - { - size, err := m.Structure.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Style != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Style)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockContentDashboard) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentDashboard) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentDashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Headers != nil { - { - size, err := m.Headers.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Structure != nil { - { - size, err := m.Structure.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Style != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Style)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockContentDataview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentDataview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentDataview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *BlockContentText) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentText) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentText) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Checked { - i-- - if m.Checked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.Checkable { - i-- - if m.Checkable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.MarkerType != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.MarkerType)) - i-- - dAtA[i] = 0x28 - } - if m.Toggleable { - i-- - if m.Toggleable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.MarksList != nil { - { - size, err := m.MarksList.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Style != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Style)) - i-- - dAtA[i] = 0x10 - } - if len(m.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Text))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockContentText_Marks) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentText_Marks) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentText_Marks) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Marks) > 0 { - for iNdEx := len(m.Marks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Marks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BlockContentText_Mark) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentText_Mark) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentText_Mark) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Param) > 0 { - i -= len(m.Param) - copy(dAtA[i:], m.Param) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Param))) - i-- - dAtA[i] = 0x1a - } - if m.Type != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - if m.Range != nil { - { - size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockContentMedia) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockContentMedia) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockContentMedia) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Link) > 0 { - i -= len(m.Link) - copy(dAtA[i:], m.Link) - i = encodeVarintBlock(dAtA, i, uint64(len(m.Link))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Range) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Range) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.To != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.To)) - i-- - dAtA[i] = 0x10 - } - if m.From != 0 { - i = encodeVarintBlock(dAtA, i, uint64(m.From)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintBlock(dAtA []byte, offset int, v uint64) int { - offset -= sovBlock(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BlockOpenRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockOpenResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.BlockHeader != nil { - l = m.BlockHeader.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockOpenResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovBlock(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockCreateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovBlock(uint64(m.Type)) - } - return n -} - -func (m *BlockCreateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockCreateResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovBlock(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockUpdateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Changes != nil { - l = m.Changes.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockUpdateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockUpdateResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovBlock(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockShow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Changes != nil { - l = m.Changes.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockCreate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockContentTextChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Change != nil { - n += m.Change.Size() - } - return n -} - -func (m *BlockContentTextChange_Text) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Text) - n += 1 + l + sovBlock(uint64(l)) - return n -} -func (m *BlockContentTextChange_Style) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBlock(uint64(m.Style)) - return n -} -func (m *BlockContentTextChange_Marks) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Marks != nil { - l = m.Marks.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockContentTextChange_Toggleable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *BlockContentTextChange_MarkerType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBlock(uint64(m.MarkerType)) - return n -} -func (m *BlockContentTextChange_Checkable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *BlockContentTextChange_Checked) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *BlockContentPageChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Change != nil { - n += m.Change.Size() - } - return n -} - -func (m *BlockContentPageChange_Style) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBlock(uint64(m.Style)) - return n -} -func (m *BlockContentPageChange_Structure) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Structure != nil { - l = m.Structure.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockContentPageChange_Blocks) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Blocks != nil { - l = m.Blocks.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockHeaderChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Change != nil { - n += m.Change.Size() - } - return n -} - -func (m *BlockHeaderChange_Id) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - n += 1 + l + sovBlock(uint64(l)) - return n -} -func (m *BlockHeaderChange_Type) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBlock(uint64(m.Type)) - return n -} -func (m *BlockHeaderChange_Name) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovBlock(uint64(l)) - return n -} -func (m *BlockHeaderChange_Icon) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Icon) - n += 1 + l + sovBlock(uint64(l)) - return n -} -func (m *BlockHeaderChange_Permissions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Permissions != nil { - l = m.Permissions.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockContentDashboardChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Change != nil { - n += m.Change.Size() - } - return n -} - -func (m *BlockContentDashboardChange_Style) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBlock(uint64(m.Style)) - return n -} -func (m *BlockContentDashboardChange_Structure) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Structure != nil { - l = m.Structure.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockContentDashboardChange_Headers) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Headers != nil { - l = m.Headers.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockAtomicChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - if m.Change != nil { - n += m.Change.Size() - } - return n -} - -func (m *BlockAtomicChange_Text) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Text != nil { - l = m.Text.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockAtomicChange_BlockHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeader != nil { - l = m.BlockHeader.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockAtomicChange_Page) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Page != nil { - l = m.Page.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockAtomicChange_Dashboard) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Dashboard != nil { - l = m.Dashboard.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovBlock(uint64(l)) - } - } - return n -} - -func (m *Block) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.Content != nil { - n += m.Content.Size() - } - return n -} - -func (m *Block_Dashboard) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Dashboard != nil { - l = m.Dashboard.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *Block_Page) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Page != nil { - l = m.Page.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *Block_Dataview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Dataview != nil { - l = m.Dataview.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *Block_Text) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Text != nil { - l = m.Text.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *Block_Media) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Media != nil { - l = m.Media.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} -func (m *BlockHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovBlock(uint64(m.Type)) - } - if m.Fields != nil { - l = m.Fields.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.Permissions != nil { - l = m.Permissions.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockPermissions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Read { - n += 2 - } - if m.Edit { - n += 2 - } - if m.Remove { - n += 2 - } - if m.Drag { - n += 2 - } - if m.DropOn { - n += 2 - } - return n -} - -func (m *BlockConnections) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - l = len(m.Next) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - l = len(m.ColumnBottom) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - l = len(m.RowRight) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockConnectionsList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Structure) > 0 { - for _, e := range m.Structure { - l = e.Size() - n += 1 + l + sovBlock(uint64(l)) - } - } - return n -} - -func (m *BlockHeadersList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Headers) > 0 { - for _, e := range m.Headers { - l = e.Size() - n += 1 + l + sovBlock(uint64(l)) - } - } - return n -} - -func (m *BlocksList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Blocks) > 0 { - for _, e := range m.Blocks { - l = e.Size() - n += 1 + l + sovBlock(uint64(l)) - } - } - return n -} - -func (m *BlockContentPage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Style != 0 { - n += 1 + sovBlock(uint64(m.Style)) - } - if m.Structure != nil { - l = m.Structure.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.Blocks != nil { - l = m.Blocks.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockContentDashboard) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Style != 0 { - n += 1 + sovBlock(uint64(m.Style)) - } - if m.Structure != nil { - l = m.Structure.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.Headers != nil { - l = m.Headers.Size() - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockContentDataview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *BlockContentText) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Text) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - if m.Style != 0 { - n += 1 + sovBlock(uint64(m.Style)) - } - if m.MarksList != nil { - l = m.MarksList.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.Toggleable { - n += 2 - } - if m.MarkerType != 0 { - n += 1 + sovBlock(uint64(m.MarkerType)) - } - if m.Checkable { - n += 2 - } - if m.Checked { - n += 2 - } - return n -} - -func (m *BlockContentText_Marks) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Marks) > 0 { - for _, e := range m.Marks { - l = e.Size() - n += 1 + l + sovBlock(uint64(l)) - } - } - return n -} - -func (m *BlockContentText_Mark) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Range != nil { - l = m.Range.Size() - n += 1 + l + sovBlock(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovBlock(uint64(m.Type)) - } - l = len(m.Param) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *BlockContentMedia) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Link) - if l > 0 { - n += 1 + l + sovBlock(uint64(l)) - } - return n -} - -func (m *Range) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.From != 0 { - n += 1 + sovBlock(uint64(m.From)) - } - if m.To != 0 { - n += 1 + sovBlock(uint64(m.To)) - } - return n -} - -func sovBlock(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozBlock(x uint64) (n int) { - return sovBlock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BlockOpenRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockOpenRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockOpenRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockOpenResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockOpenResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockOpenResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &BlockOpenResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockHeader == nil { - m.BlockHeader = &BlockHeader{} - } - if err := m.BlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockOpenResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= BlockOpenResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockCreateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockCreateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= BlockType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockCreateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockCreateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockCreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &BlockCreateResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockCreateResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= BlockCreateResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockUpdateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockUpdateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Changes == nil { - m.Changes = &BlockChanges{} - } - if err := m.Changes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockUpdateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockUpdateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &BlockUpdateResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockUpdateResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= BlockUpdateResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockShow) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockShow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockShow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockUpdate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Changes == nil { - m.Changes = &BlockChanges{} - } - if err := m.Changes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockCreate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockCreate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockCreate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentTextChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentTextChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentTextChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Change = &BlockContentTextChange_Text{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - var v BlockContentText_Style - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= BlockContentText_Style(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Change = &BlockContentTextChange_Style{v} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Marks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentText_Marks{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockContentTextChange_Marks{v} - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Toggleable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Change = &BlockContentTextChange_Toggleable{b} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MarkerType", wireType) - } - var v BlockContentText_MarkerType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= BlockContentText_MarkerType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Change = &BlockContentTextChange_MarkerType{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Change = &BlockContentTextChange_Checkable{b} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checked", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Change = &BlockContentTextChange_Checked{b} - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentPageChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentPageChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentPageChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - var v BlockContentPage_Style - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= BlockContentPage_Style(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Change = &BlockContentPageChange_Style{v} - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Structure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockConnectionsList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockContentPageChange_Structure{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlocksList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockContentPageChange_Blocks{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockHeaderChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockHeaderChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockHeaderChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Change = &BlockHeaderChange_Id{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v BlockType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= BlockType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Change = &BlockHeaderChange_Type{v} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Change = &BlockHeaderChange_Name{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Change = &BlockHeaderChange_Icon{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockPermissions{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockHeaderChange_Permissions{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentDashboardChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentDashboardChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentDashboardChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - var v BlockContentDashboard_Style - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= BlockContentDashboard_Style(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Change = &BlockContentDashboardChange_Style{v} - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Structure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockConnectionsList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockContentDashboardChange_Structure{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockHeadersList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockContentDashboardChange_Headers{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockAtomicChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockAtomicChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockAtomicChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentTextChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockAtomicChange_Text{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockHeaderChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockAtomicChange_BlockHeader{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentPageChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockAtomicChange_Page{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dashboard", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentDashboardChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Change = &BlockAtomicChange_Dashboard{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockChanges) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockChanges: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockChanges: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &BlockAtomicChange{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Block) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Block: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &BlockHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dashboard", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentDashboard{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Content = &Block_Dashboard{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentPage{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Content = &Block_Page{v} - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dataview", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentDataview{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Content = &Block_Dataview{v} - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentText{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Content = &Block_Text{v} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Media", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockContentMedia{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Content = &Block_Media{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= BlockType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fields == nil { - m.Fields = &Struct{} - } - if err := m.Fields.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Permissions == nil { - m.Permissions = &BlockPermissions{} - } - if err := m.Permissions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockPermissions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockPermissions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockPermissions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Read", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Read = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Edit", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Edit = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Remove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Remove = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Drag", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Drag = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DropOn", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DropOn = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockConnections) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockConnections: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockConnections: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Next", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Next = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ColumnBottom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ColumnBottom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RowRight", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RowRight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockConnectionsList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockConnectionsList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockConnectionsList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Structure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Structure = append(m.Structure, &BlockConnections{}) - if err := m.Structure[len(m.Structure)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockHeadersList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockHeadersList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockHeadersList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Headers = append(m.Headers, &BlockHeader{}) - if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlocksList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlocksList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlocksList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Blocks = append(m.Blocks, &Block{}) - if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentPage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentPage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentPage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - m.Style = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Style |= BlockContentPage_Style(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Structure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Structure == nil { - m.Structure = &BlockConnectionsList{} - } - if err := m.Structure.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Blocks == nil { - m.Blocks = &BlocksList{} - } - if err := m.Blocks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentDashboard) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentDashboard: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentDashboard: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - m.Style = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Style |= BlockContentDashboard_Style(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Structure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Structure == nil { - m.Structure = &BlockConnectionsList{} - } - if err := m.Structure.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = &BlockHeadersList{} - } - if err := m.Headers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentDataview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentDataview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentDataview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentText) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentText: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentText: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Text = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) - } - m.Style = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Style |= BlockContentText_Style(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MarksList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MarksList == nil { - m.MarksList = &BlockContentText_Marks{} - } - if err := m.MarksList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Toggleable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Toggleable = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MarkerType", wireType) - } - m.MarkerType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MarkerType |= BlockContentText_MarkerType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Checkable = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checked", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Checked = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentText_Marks) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Marks: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Marks: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Marks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Marks = append(m.Marks, &BlockContentText_Mark{}) - if err := m.Marks[len(m.Marks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentText_Mark) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Mark: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Mark: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Range == nil { - m.Range = &Range{} - } - if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= BlockContentText_Mark_Type(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Param", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Param = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockContentMedia) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockContentMedia: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockContentMedia: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Link = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Range) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Range: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - m.From = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.From |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - m.To = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.To |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBlock(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthBlock - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupBlock - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthBlock - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBlock = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pb/changes.pb.go b/pb/changes.pb.go new file mode 100644 index 000000000..f12f3fc99 --- /dev/null +++ b/pb/changes.pb.go @@ -0,0 +1,3560 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: changes.proto + +package pb + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Change struct { +} + +func (m *Change) Reset() { *m = Change{} } +func (m *Change) String() string { return proto.CompactTextString(m) } +func (*Change) ProtoMessage() {} +func (*Change) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0} +} +func (m *Change) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Change.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Change) XXX_Merge(src proto.Message) { + xxx_messageInfo_Change.Merge(m, src) +} +func (m *Change) XXX_Size() int { + return m.Size() +} +func (m *Change) XXX_DiscardUnknown() { + xxx_messageInfo_Change.DiscardUnknown(m) +} + +var xxx_messageInfo_Change proto.InternalMessageInfo + +type ChangeBlock struct { +} + +func (m *ChangeBlock) Reset() { *m = ChangeBlock{} } +func (m *ChangeBlock) String() string { return proto.CompactTextString(m) } +func (*ChangeBlock) ProtoMessage() {} +func (*ChangeBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0} +} +func (m *ChangeBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlock.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlock.Merge(m, src) +} +func (m *ChangeBlock) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlock) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlock proto.InternalMessageInfo + +type ChangeBlockHeader struct { + // Types that are valid to be assigned to Change: + // *ChangeBlockHeaderChangeOfId + // *ChangeBlockHeaderChangeOfType + // *ChangeBlockHeaderChangeOfName + // *ChangeBlockHeaderChangeOfIcon + // *ChangeBlockHeaderChangeOfPermissions + Change isChangeBlockHeaderChange `protobuf_oneof:"change"` +} + +func (m *ChangeBlockHeader) Reset() { *m = ChangeBlockHeader{} } +func (m *ChangeBlockHeader) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockHeader) ProtoMessage() {} +func (*ChangeBlockHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 0} +} +func (m *ChangeBlockHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockHeader.Merge(m, src) +} +func (m *ChangeBlockHeader) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockHeader) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockHeader proto.InternalMessageInfo + +type isChangeBlockHeaderChange interface { + isChangeBlockHeaderChange() + MarshalTo([]byte) (int, error) + Size() int +} + +type ChangeBlockHeaderChangeOfId struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` +} +type ChangeBlockHeaderChangeOfType struct { + Type ModelBlockHeaderType `protobuf:"varint,2,opt,name=type,proto3,enum=anytype.ModelBlockHeaderType,oneof" json:"type,omitempty"` +} +type ChangeBlockHeaderChangeOfName struct { + Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` +} +type ChangeBlockHeaderChangeOfIcon struct { + Icon string `protobuf:"bytes,4,opt,name=icon,proto3,oneof" json:"icon,omitempty"` +} +type ChangeBlockHeaderChangeOfPermissions struct { + Permissions *ModelBlockHeaderPermissions `protobuf:"bytes,5,opt,name=permissions,proto3,oneof" json:"permissions,omitempty"` +} + +func (*ChangeBlockHeaderChangeOfId) isChangeBlockHeaderChange() {} +func (*ChangeBlockHeaderChangeOfType) isChangeBlockHeaderChange() {} +func (*ChangeBlockHeaderChangeOfName) isChangeBlockHeaderChange() {} +func (*ChangeBlockHeaderChangeOfIcon) isChangeBlockHeaderChange() {} +func (*ChangeBlockHeaderChangeOfPermissions) isChangeBlockHeaderChange() {} + +func (m *ChangeBlockHeader) GetChange() isChangeBlockHeaderChange { + if m != nil { + return m.Change + } + return nil +} + +func (m *ChangeBlockHeader) GetId() string { + if x, ok := m.GetChange().(*ChangeBlockHeaderChangeOfId); ok { + return x.Id + } + return "" +} + +func (m *ChangeBlockHeader) GetType() ModelBlockHeaderType { + if x, ok := m.GetChange().(*ChangeBlockHeaderChangeOfType); ok { + return x.Type + } + return ModelBlockHeader_DASHBOARD +} + +func (m *ChangeBlockHeader) GetName() string { + if x, ok := m.GetChange().(*ChangeBlockHeaderChangeOfName); ok { + return x.Name + } + return "" +} + +func (m *ChangeBlockHeader) GetIcon() string { + if x, ok := m.GetChange().(*ChangeBlockHeaderChangeOfIcon); ok { + return x.Icon + } + return "" +} + +func (m *ChangeBlockHeader) GetPermissions() *ModelBlockHeaderPermissions { + if x, ok := m.GetChange().(*ChangeBlockHeaderChangeOfPermissions); ok { + return x.Permissions + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ChangeBlockHeader) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ChangeBlockHeaderChangeOfId)(nil), + (*ChangeBlockHeaderChangeOfType)(nil), + (*ChangeBlockHeaderChangeOfName)(nil), + (*ChangeBlockHeaderChangeOfIcon)(nil), + (*ChangeBlockHeaderChangeOfPermissions)(nil), + } +} + +type ChangeBlockChildren struct { + Children []string `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` +} + +func (m *ChangeBlockChildren) Reset() { *m = ChangeBlockChildren{} } +func (m *ChangeBlockChildren) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockChildren) ProtoMessage() {} +func (*ChangeBlockChildren) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 1} +} +func (m *ChangeBlockChildren) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockChildren) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockChildren.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockChildren) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockChildren.Merge(m, src) +} +func (m *ChangeBlockChildren) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockChildren) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockChildren.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockChildren proto.InternalMessageInfo + +func (m *ChangeBlockChildren) GetChildren() []string { + if m != nil { + return m.Children + } + return nil +} + +type ChangeBlockContent struct { +} + +func (m *ChangeBlockContent) Reset() { *m = ChangeBlockContent{} } +func (m *ChangeBlockContent) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockContent) ProtoMessage() {} +func (*ChangeBlockContent) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 2} +} +func (m *ChangeBlockContent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockContent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockContent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockContent.Merge(m, src) +} +func (m *ChangeBlockContent) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockContent) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockContent.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockContent proto.InternalMessageInfo + +type ChangeBlockContentPage struct { + // Types that are valid to be assigned to Change: + // *ChangeBlockContentPageChangeOfStyle + // *ChangeBlockContentPageChangeOfBlock + Change isChangeBlockContentPageChange `protobuf_oneof:"change"` +} + +func (m *ChangeBlockContentPage) Reset() { *m = ChangeBlockContentPage{} } +func (m *ChangeBlockContentPage) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockContentPage) ProtoMessage() {} +func (*ChangeBlockContentPage) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 2, 0} +} +func (m *ChangeBlockContentPage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockContentPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockContentPage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockContentPage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockContentPage.Merge(m, src) +} +func (m *ChangeBlockContentPage) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockContentPage) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockContentPage.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockContentPage proto.InternalMessageInfo + +type isChangeBlockContentPageChange interface { + isChangeBlockContentPageChange() + MarshalTo([]byte) (int, error) + Size() int +} + +type ChangeBlockContentPageChangeOfStyle struct { + Style ModelBlockContentPageStyle `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.ModelBlockContentPageStyle,oneof" json:"style,omitempty"` +} +type ChangeBlockContentPageChangeOfBlock struct { + Block *ModelBlock `protobuf:"bytes,2,opt,name=block,proto3,oneof" json:"block,omitempty"` +} + +func (*ChangeBlockContentPageChangeOfStyle) isChangeBlockContentPageChange() {} +func (*ChangeBlockContentPageChangeOfBlock) isChangeBlockContentPageChange() {} + +func (m *ChangeBlockContentPage) GetChange() isChangeBlockContentPageChange { + if m != nil { + return m.Change + } + return nil +} + +func (m *ChangeBlockContentPage) GetStyle() ModelBlockContentPageStyle { + if x, ok := m.GetChange().(*ChangeBlockContentPageChangeOfStyle); ok { + return x.Style + } + return ModelBlockContentPage_EMPTY +} + +func (m *ChangeBlockContentPage) GetBlock() *ModelBlock { + if x, ok := m.GetChange().(*ChangeBlockContentPageChangeOfBlock); ok { + return x.Block + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ChangeBlockContentPage) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ChangeBlockContentPageChangeOfStyle)(nil), + (*ChangeBlockContentPageChangeOfBlock)(nil), + } +} + +type ChangeBlockContentDashboard struct { + // Types that are valid to be assigned to Change: + // *ChangeBlockContentDashboardChangeOfStyle + // *ChangeBlockContentDashboardChangeOfHeader + Change isChangeBlockContentDashboardChange `protobuf_oneof:"change"` +} + +func (m *ChangeBlockContentDashboard) Reset() { *m = ChangeBlockContentDashboard{} } +func (m *ChangeBlockContentDashboard) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockContentDashboard) ProtoMessage() {} +func (*ChangeBlockContentDashboard) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 2, 1} +} +func (m *ChangeBlockContentDashboard) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockContentDashboard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockContentDashboard.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockContentDashboard) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockContentDashboard.Merge(m, src) +} +func (m *ChangeBlockContentDashboard) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockContentDashboard) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockContentDashboard.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockContentDashboard proto.InternalMessageInfo + +type isChangeBlockContentDashboardChange interface { + isChangeBlockContentDashboardChange() + MarshalTo([]byte) (int, error) + Size() int +} + +type ChangeBlockContentDashboardChangeOfStyle struct { + Style ModelBlockContentDashboardStyle `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.ModelBlockContentDashboardStyle,oneof" json:"style,omitempty"` +} +type ChangeBlockContentDashboardChangeOfHeader struct { + Header *ModelBlockHeader `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"` +} + +func (*ChangeBlockContentDashboardChangeOfStyle) isChangeBlockContentDashboardChange() {} +func (*ChangeBlockContentDashboardChangeOfHeader) isChangeBlockContentDashboardChange() {} + +func (m *ChangeBlockContentDashboard) GetChange() isChangeBlockContentDashboardChange { + if m != nil { + return m.Change + } + return nil +} + +func (m *ChangeBlockContentDashboard) GetStyle() ModelBlockContentDashboardStyle { + if x, ok := m.GetChange().(*ChangeBlockContentDashboardChangeOfStyle); ok { + return x.Style + } + return ModelBlockContentDashboard_MAIN_SCREEN +} + +func (m *ChangeBlockContentDashboard) GetHeader() *ModelBlockHeader { + if x, ok := m.GetChange().(*ChangeBlockContentDashboardChangeOfHeader); ok { + return x.Header + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ChangeBlockContentDashboard) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ChangeBlockContentDashboardChangeOfStyle)(nil), + (*ChangeBlockContentDashboardChangeOfHeader)(nil), + } +} + +type ChangeBlockContentMedia struct { + // Types that are valid to be assigned to Change: + // *ChangeBlockContentMediaChangeOfLink + // *ChangeBlockContentMediaChangeOfState + Change isChangeBlockContentMediaChange `protobuf_oneof:"change"` +} + +func (m *ChangeBlockContentMedia) Reset() { *m = ChangeBlockContentMedia{} } +func (m *ChangeBlockContentMedia) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockContentMedia) ProtoMessage() {} +func (*ChangeBlockContentMedia) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 2, 2} +} +func (m *ChangeBlockContentMedia) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockContentMedia) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockContentMedia.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockContentMedia) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockContentMedia.Merge(m, src) +} +func (m *ChangeBlockContentMedia) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockContentMedia) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockContentMedia.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockContentMedia proto.InternalMessageInfo + +type isChangeBlockContentMediaChange interface { + isChangeBlockContentMediaChange() + MarshalTo([]byte) (int, error) + Size() int +} + +type ChangeBlockContentMediaChangeOfLink struct { + Link string `protobuf:"bytes,1,opt,name=link,proto3,oneof" json:"link,omitempty"` +} +type ChangeBlockContentMediaChangeOfState struct { + State ModelBlockContentMediaState `protobuf:"varint,2,opt,name=state,proto3,enum=anytype.ModelBlockContentMediaState,oneof" json:"state,omitempty"` +} + +func (*ChangeBlockContentMediaChangeOfLink) isChangeBlockContentMediaChange() {} +func (*ChangeBlockContentMediaChangeOfState) isChangeBlockContentMediaChange() {} + +func (m *ChangeBlockContentMedia) GetChange() isChangeBlockContentMediaChange { + if m != nil { + return m.Change + } + return nil +} + +func (m *ChangeBlockContentMedia) GetLink() string { + if x, ok := m.GetChange().(*ChangeBlockContentMediaChangeOfLink); ok { + return x.Link + } + return "" +} + +func (m *ChangeBlockContentMedia) GetState() ModelBlockContentMediaState { + if x, ok := m.GetChange().(*ChangeBlockContentMediaChangeOfState); ok { + return x.State + } + return ModelBlockContentMedia_EMPTY +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ChangeBlockContentMedia) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ChangeBlockContentMediaChangeOfLink)(nil), + (*ChangeBlockContentMediaChangeOfState)(nil), + } +} + +type ChangeBlockContentText struct { + // Types that are valid to be assigned to Change: + // *ChangeBlockContentTextChangeOfText + // *ChangeBlockContentTextChangeOfStyle + // *ChangeBlockContentTextChangeOfMarks + // *ChangeBlockContentTextChangeOfToggleable + // *ChangeBlockContentTextChangeOfMarkerType + // *ChangeBlockContentTextChangeOfCheckable + // *ChangeBlockContentTextChangeOfChecked + Change isChangeBlockContentTextChange `protobuf_oneof:"change"` +} + +func (m *ChangeBlockContentText) Reset() { *m = ChangeBlockContentText{} } +func (m *ChangeBlockContentText) String() string { return proto.CompactTextString(m) } +func (*ChangeBlockContentText) ProtoMessage() {} +func (*ChangeBlockContentText) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{0, 0, 2, 3} +} +func (m *ChangeBlockContentText) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeBlockContentText) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeBlockContentText.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChangeBlockContentText) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeBlockContentText.Merge(m, src) +} +func (m *ChangeBlockContentText) XXX_Size() int { + return m.Size() +} +func (m *ChangeBlockContentText) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeBlockContentText.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeBlockContentText proto.InternalMessageInfo + +type isChangeBlockContentTextChange interface { + isChangeBlockContentTextChange() + MarshalTo([]byte) (int, error) + Size() int +} + +type ChangeBlockContentTextChangeOfText struct { + Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"` +} +type ChangeBlockContentTextChangeOfStyle struct { + Style ModelBlockContentTextStyle `protobuf:"varint,2,opt,name=style,proto3,enum=anytype.ModelBlockContentTextStyle,oneof" json:"style,omitempty"` +} +type ChangeBlockContentTextChangeOfMarks struct { + Marks *ModelBlockContentTextMarks `protobuf:"bytes,3,opt,name=marks,proto3,oneof" json:"marks,omitempty"` +} +type ChangeBlockContentTextChangeOfToggleable struct { + Toggleable bool `protobuf:"varint,4,opt,name=toggleable,proto3,oneof" json:"toggleable,omitempty"` +} +type ChangeBlockContentTextChangeOfMarkerType struct { + MarkerType ModelBlockContentTextMarkerType `protobuf:"varint,5,opt,name=markerType,proto3,enum=anytype.ModelBlockContentTextMarkerType,oneof" json:"markerType,omitempty"` +} +type ChangeBlockContentTextChangeOfCheckable struct { + Checkable bool `protobuf:"varint,6,opt,name=checkable,proto3,oneof" json:"checkable,omitempty"` +} +type ChangeBlockContentTextChangeOfChecked struct { + Checked bool `protobuf:"varint,7,opt,name=checked,proto3,oneof" json:"checked,omitempty"` +} + +func (*ChangeBlockContentTextChangeOfText) isChangeBlockContentTextChange() {} +func (*ChangeBlockContentTextChangeOfStyle) isChangeBlockContentTextChange() {} +func (*ChangeBlockContentTextChangeOfMarks) isChangeBlockContentTextChange() {} +func (*ChangeBlockContentTextChangeOfToggleable) isChangeBlockContentTextChange() {} +func (*ChangeBlockContentTextChangeOfMarkerType) isChangeBlockContentTextChange() {} +func (*ChangeBlockContentTextChangeOfCheckable) isChangeBlockContentTextChange() {} +func (*ChangeBlockContentTextChangeOfChecked) isChangeBlockContentTextChange() {} + +func (m *ChangeBlockContentText) GetChange() isChangeBlockContentTextChange { + if m != nil { + return m.Change + } + return nil +} + +func (m *ChangeBlockContentText) GetText() string { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfText); ok { + return x.Text + } + return "" +} + +func (m *ChangeBlockContentText) GetStyle() ModelBlockContentTextStyle { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfStyle); ok { + return x.Style + } + return ModelBlockContentText_p +} + +func (m *ChangeBlockContentText) GetMarks() *ModelBlockContentTextMarks { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfMarks); ok { + return x.Marks + } + return nil +} + +func (m *ChangeBlockContentText) GetToggleable() bool { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfToggleable); ok { + return x.Toggleable + } + return false +} + +func (m *ChangeBlockContentText) GetMarkerType() ModelBlockContentTextMarkerType { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfMarkerType); ok { + return x.MarkerType + } + return ModelBlockContentText_none +} + +func (m *ChangeBlockContentText) GetCheckable() bool { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfCheckable); ok { + return x.Checkable + } + return false +} + +func (m *ChangeBlockContentText) GetChecked() bool { + if x, ok := m.GetChange().(*ChangeBlockContentTextChangeOfChecked); ok { + return x.Checked + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ChangeBlockContentText) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ChangeBlockContentTextChangeOfText)(nil), + (*ChangeBlockContentTextChangeOfStyle)(nil), + (*ChangeBlockContentTextChangeOfMarks)(nil), + (*ChangeBlockContentTextChangeOfToggleable)(nil), + (*ChangeBlockContentTextChangeOfMarkerType)(nil), + (*ChangeBlockContentTextChangeOfCheckable)(nil), + (*ChangeBlockContentTextChangeOfChecked)(nil), + } +} + +type BlocksListSingleChange struct { + Id []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"` + // Types that are valid to be assigned to Change: + // *BlocksListSingleChangeChangeOfText + // *BlocksListSingleChangeChangeOfBlockHeader + // *BlocksListSingleChangeChangeOfBlockChildren + // *BlocksListSingleChangeChangeOfPage + // *BlocksListSingleChangeChangeOfDashboard + // *BlocksListSingleChangeChangeOfMedia + Change isBlocksListSingleChangeChange `protobuf_oneof:"change"` +} + +func (m *BlocksListSingleChange) Reset() { *m = BlocksListSingleChange{} } +func (m *BlocksListSingleChange) String() string { return proto.CompactTextString(m) } +func (*BlocksListSingleChange) ProtoMessage() {} +func (*BlocksListSingleChange) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{1} +} +func (m *BlocksListSingleChange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlocksListSingleChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlocksListSingleChange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BlocksListSingleChange) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlocksListSingleChange.Merge(m, src) +} +func (m *BlocksListSingleChange) XXX_Size() int { + return m.Size() +} +func (m *BlocksListSingleChange) XXX_DiscardUnknown() { + xxx_messageInfo_BlocksListSingleChange.DiscardUnknown(m) +} + +var xxx_messageInfo_BlocksListSingleChange proto.InternalMessageInfo + +type isBlocksListSingleChangeChange interface { + isBlocksListSingleChangeChange() + MarshalTo([]byte) (int, error) + Size() int +} + +type BlocksListSingleChangeChangeOfText struct { + Text *ChangeBlockContentText `protobuf:"bytes,2,opt,name=text,proto3,oneof" json:"text,omitempty"` +} +type BlocksListSingleChangeChangeOfBlockHeader struct { + BlockHeader *ChangeBlockHeader `protobuf:"bytes,3,opt,name=blockHeader,proto3,oneof" json:"blockHeader,omitempty"` +} +type BlocksListSingleChangeChangeOfBlockChildren struct { + BlockChildren *ChangeBlockChildren `protobuf:"bytes,4,opt,name=blockChildren,proto3,oneof" json:"blockChildren,omitempty"` +} +type BlocksListSingleChangeChangeOfPage struct { + Page *ChangeBlockContentPage `protobuf:"bytes,5,opt,name=page,proto3,oneof" json:"page,omitempty"` +} +type BlocksListSingleChangeChangeOfDashboard struct { + Dashboard *ChangeBlockContentDashboard `protobuf:"bytes,6,opt,name=dashboard,proto3,oneof" json:"dashboard,omitempty"` +} +type BlocksListSingleChangeChangeOfMedia struct { + Media *ChangeBlockContentMedia `protobuf:"bytes,7,opt,name=media,proto3,oneof" json:"media,omitempty"` +} + +func (*BlocksListSingleChangeChangeOfText) isBlocksListSingleChangeChange() {} +func (*BlocksListSingleChangeChangeOfBlockHeader) isBlocksListSingleChangeChange() {} +func (*BlocksListSingleChangeChangeOfBlockChildren) isBlocksListSingleChangeChange() {} +func (*BlocksListSingleChangeChangeOfPage) isBlocksListSingleChangeChange() {} +func (*BlocksListSingleChangeChangeOfDashboard) isBlocksListSingleChangeChange() {} +func (*BlocksListSingleChangeChangeOfMedia) isBlocksListSingleChangeChange() {} + +func (m *BlocksListSingleChange) GetChange() isBlocksListSingleChangeChange { + if m != nil { + return m.Change + } + return nil +} + +func (m *BlocksListSingleChange) GetId() []string { + if m != nil { + return m.Id + } + return nil +} + +func (m *BlocksListSingleChange) GetText() *ChangeBlockContentText { + if x, ok := m.GetChange().(*BlocksListSingleChangeChangeOfText); ok { + return x.Text + } + return nil +} + +func (m *BlocksListSingleChange) GetBlockHeader() *ChangeBlockHeader { + if x, ok := m.GetChange().(*BlocksListSingleChangeChangeOfBlockHeader); ok { + return x.BlockHeader + } + return nil +} + +func (m *BlocksListSingleChange) GetBlockChildren() *ChangeBlockChildren { + if x, ok := m.GetChange().(*BlocksListSingleChangeChangeOfBlockChildren); ok { + return x.BlockChildren + } + return nil +} + +func (m *BlocksListSingleChange) GetPage() *ChangeBlockContentPage { + if x, ok := m.GetChange().(*BlocksListSingleChangeChangeOfPage); ok { + return x.Page + } + return nil +} + +func (m *BlocksListSingleChange) GetDashboard() *ChangeBlockContentDashboard { + if x, ok := m.GetChange().(*BlocksListSingleChangeChangeOfDashboard); ok { + return x.Dashboard + } + return nil +} + +func (m *BlocksListSingleChange) GetMedia() *ChangeBlockContentMedia { + if x, ok := m.GetChange().(*BlocksListSingleChangeChangeOfMedia); ok { + return x.Media + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*BlocksListSingleChange) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*BlocksListSingleChangeChangeOfText)(nil), + (*BlocksListSingleChangeChangeOfBlockHeader)(nil), + (*BlocksListSingleChangeChangeOfBlockChildren)(nil), + (*BlocksListSingleChangeChangeOfPage)(nil), + (*BlocksListSingleChangeChangeOfDashboard)(nil), + (*BlocksListSingleChangeChangeOfMedia)(nil), + } +} + +type BlockChanges struct { + Changes []*BlocksListSingleChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` +} + +func (m *BlockChanges) Reset() { *m = BlockChanges{} } +func (m *BlockChanges) String() string { return proto.CompactTextString(m) } +func (*BlockChanges) ProtoMessage() {} +func (*BlockChanges) Descriptor() ([]byte, []int) { + return fileDescriptor_b16a38c6509bd894, []int{2} +} +func (m *BlockChanges) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockChanges.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BlockChanges) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockChanges.Merge(m, src) +} +func (m *BlockChanges) XXX_Size() int { + return m.Size() +} +func (m *BlockChanges) XXX_DiscardUnknown() { + xxx_messageInfo_BlockChanges.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockChanges proto.InternalMessageInfo + +func (m *BlockChanges) GetChanges() []*BlocksListSingleChange { + if m != nil { + return m.Changes + } + return nil +} + +func init() { + proto.RegisterType((*Change)(nil), "anytype.Change") + proto.RegisterType((*ChangeBlock)(nil), "anytype.Change.Block") + proto.RegisterType((*ChangeBlockHeader)(nil), "anytype.Change.Block.Header") + proto.RegisterType((*ChangeBlockChildren)(nil), "anytype.Change.Block.Children") + proto.RegisterType((*ChangeBlockContent)(nil), "anytype.Change.Block.Content") + proto.RegisterType((*ChangeBlockContentPage)(nil), "anytype.Change.Block.Content.Page") + proto.RegisterType((*ChangeBlockContentDashboard)(nil), "anytype.Change.Block.Content.Dashboard") + proto.RegisterType((*ChangeBlockContentMedia)(nil), "anytype.Change.Block.Content.Media") + proto.RegisterType((*ChangeBlockContentText)(nil), "anytype.Change.Block.Content.Text") + proto.RegisterType((*BlocksListSingleChange)(nil), "anytype.BlocksListSingleChange") + proto.RegisterType((*BlockChanges)(nil), "anytype.BlockChanges") +} + +func init() { proto.RegisterFile("changes.proto", fileDescriptor_b16a38c6509bd894) } + +var fileDescriptor_b16a38c6509bd894 = []byte{ + // 682 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x3d, 0x6f, 0xd3, 0x50, + 0x14, 0xb5, 0xd3, 0x38, 0x1f, 0xd7, 0x6d, 0x85, 0x9e, 0x2a, 0x64, 0x99, 0xca, 0x44, 0x45, 0x82, + 0x0c, 0x95, 0x87, 0x20, 0x10, 0x88, 0xa1, 0x55, 0x5a, 0x81, 0x11, 0x14, 0x55, 0x6e, 0x27, 0xb6, + 0x97, 0xf8, 0x29, 0xb1, 0xe2, 0xd8, 0x91, 0xfd, 0x86, 0x66, 0xe2, 0x2f, 0x20, 0x7e, 0x0c, 0xbf, + 0x81, 0xb1, 0x0b, 0x88, 0x11, 0x35, 0x33, 0x3b, 0x23, 0xba, 0xd7, 0x2f, 0xb6, 0x5b, 0xa5, 0x69, + 0x37, 0xdf, 0x97, 0x73, 0xce, 0x3d, 0xef, 0x7e, 0xbc, 0xc0, 0xd6, 0x70, 0xcc, 0xe3, 0x91, 0xc8, + 0xdc, 0x59, 0x9a, 0xc8, 0x84, 0x35, 0x79, 0x3c, 0x97, 0xf3, 0x99, 0xb0, 0x37, 0xa7, 0x49, 0x20, + 0x22, 0x75, 0xbc, 0xf7, 0xaf, 0x09, 0x8d, 0x23, 0x02, 0xda, 0x7f, 0x9b, 0x60, 0xf4, 0xa3, 0x64, + 0x38, 0xb1, 0x7f, 0xea, 0xd0, 0xf0, 0x04, 0x0f, 0x44, 0xca, 0x1e, 0x40, 0x2d, 0x0c, 0x2c, 0xbd, + 0xa3, 0x77, 0xdb, 0x9e, 0xe6, 0xd7, 0xc2, 0x80, 0xbd, 0x84, 0x3a, 0xea, 0x58, 0xb5, 0x8e, 0xde, + 0xdd, 0xee, 0x75, 0x5c, 0xa5, 0xeb, 0x9e, 0xa0, 0xac, 0x4b, 0x02, 0x6e, 0x4e, 0x76, 0xcf, 0xe7, + 0x33, 0xe1, 0x69, 0x3e, 0xe1, 0xd9, 0x0e, 0xd4, 0x63, 0x3e, 0x15, 0xd6, 0x86, 0xd2, 0xa2, 0x08, + 0x4f, 0xc3, 0x61, 0x12, 0x5b, 0xf5, 0xe5, 0x29, 0x46, 0xec, 0x03, 0x98, 0x33, 0x91, 0x4e, 0xc3, + 0x2c, 0x0b, 0x93, 0x38, 0xb3, 0x8c, 0x8e, 0xde, 0x35, 0x7b, 0xcf, 0xd6, 0xa5, 0x3a, 0x2d, 0xe1, + 0x9e, 0xe6, 0x57, 0xd9, 0xfd, 0x16, 0x34, 0xf2, 0x52, 0xd8, 0x4f, 0xa1, 0x75, 0x34, 0x0e, 0xa3, + 0x20, 0x15, 0x31, 0xb3, 0xa1, 0x35, 0x54, 0xdf, 0x96, 0xde, 0xd9, 0xe8, 0xb6, 0xfd, 0x22, 0xb6, + 0x17, 0x06, 0x34, 0x8f, 0x92, 0x58, 0x8a, 0x58, 0xda, 0x5f, 0xa0, 0x7e, 0xca, 0x47, 0x82, 0x1d, + 0x80, 0x91, 0xc9, 0x79, 0x24, 0xa8, 0x16, 0xdb, 0xb7, 0x98, 0x51, 0x24, 0x17, 0x19, 0xee, 0x19, + 0xc2, 0x3d, 0xcd, 0xcf, 0x79, 0x6c, 0x1f, 0x8c, 0x01, 0x82, 0xa8, 0x70, 0x66, 0x6f, 0x67, 0x95, + 0x00, 0xa2, 0x09, 0x54, 0x31, 0xfd, 0x4d, 0x87, 0xf6, 0x31, 0xcf, 0xc6, 0x83, 0x84, 0xa7, 0x01, + 0x3b, 0xbe, 0x6e, 0x63, 0x7f, 0xad, 0x8d, 0x82, 0x76, 0xd3, 0xcb, 0x0b, 0x68, 0x8c, 0xa9, 0x6e, + 0xca, 0xcc, 0xa3, 0x35, 0xa5, 0xf5, 0x34, 0x5f, 0x81, 0x2b, 0xa6, 0x42, 0x30, 0x4e, 0x44, 0x10, + 0x72, 0xec, 0x5f, 0x14, 0xc6, 0x93, 0x62, 0x42, 0x28, 0x62, 0x87, 0xe8, 0x92, 0xcb, 0xe5, 0x90, + 0x74, 0xd7, 0xba, 0x24, 0x21, 0xf7, 0x0c, 0xf1, 0xb9, 0x43, 0x2e, 0x45, 0x25, 0xd5, 0xaf, 0x1a, + 0xd4, 0xcf, 0xc5, 0x85, 0xc4, 0x54, 0x52, 0x5c, 0xc8, 0x32, 0x15, 0x46, 0x65, 0x5f, 0x6a, 0xf7, + 0xe8, 0x0b, 0xea, 0xdc, 0xac, 0xc5, 0x01, 0x18, 0x53, 0x9e, 0x4e, 0x32, 0x1a, 0x4c, 0xf3, 0x3e, + 0x02, 0x27, 0x08, 0x47, 0x01, 0xe2, 0xb1, 0x0e, 0x80, 0x4c, 0x46, 0xa3, 0x48, 0xf0, 0x41, 0x24, + 0x68, 0x90, 0x5b, 0x9e, 0xe6, 0x57, 0xce, 0xd8, 0x27, 0x00, 0x84, 0x8a, 0x14, 0x17, 0x82, 0xa6, + 0xf9, 0xae, 0xce, 0x15, 0x79, 0x72, 0x0e, 0xea, 0x95, 0x0a, 0xcc, 0x81, 0xf6, 0x70, 0x2c, 0x86, + 0x13, 0x4a, 0xd8, 0x50, 0x09, 0xcb, 0x23, 0x66, 0x43, 0x93, 0x02, 0x11, 0x58, 0x4d, 0xf5, 0xeb, + 0xf2, 0xa0, 0x2c, 0xec, 0xde, 0xf7, 0x0d, 0x78, 0x48, 0x59, 0xb3, 0x8f, 0x61, 0x26, 0xcf, 0xc2, + 0x78, 0x14, 0x89, 0xfc, 0x29, 0x60, 0xdb, 0x6a, 0xeb, 0x71, 0x2d, 0x70, 0xe7, 0x5f, 0xa9, 0xd2, + 0xe7, 0xd3, 0xb2, 0x57, 0x58, 0xcf, 0xe1, 0x2b, 0xbc, 0x17, 0xed, 0x39, 0x04, 0x93, 0x06, 0x3a, + 0x9f, 0x25, 0x55, 0xe3, 0xdd, 0xd5, 0x02, 0xc5, 0xbc, 0x55, 0x29, 0xec, 0x2d, 0x6c, 0x51, 0xb8, + 0xdc, 0x5c, 0xaa, 0xb0, 0xd9, 0x73, 0x6e, 0x31, 0xa1, 0x50, 0x9e, 0xe6, 0x5f, 0xa7, 0xe1, 0x1d, + 0x66, 0x7c, 0x24, 0xd4, 0x63, 0x72, 0xc7, 0x1d, 0x70, 0x81, 0xf1, 0x0e, 0xc8, 0x60, 0xef, 0xa0, + 0x1d, 0x2c, 0x37, 0x89, 0xca, 0x5d, 0x9d, 0x92, 0x95, 0xf4, 0x62, 0xf1, 0xb0, 0x2f, 0x05, 0x97, + 0xbd, 0x01, 0x63, 0x8a, 0xc3, 0x4e, 0x5d, 0x31, 0x7b, 0x4f, 0xd6, 0x8b, 0xd0, 0x5e, 0xd0, 0x98, + 0xe1, 0x47, 0xa5, 0x71, 0xef, 0x61, 0xb3, 0x9f, 0x5f, 0x8d, 0x1e, 0x78, 0xf6, 0x1a, 0xdb, 0x4d, + 0x9f, 0xd4, 0x32, 0xb3, 0xf7, 0xb8, 0x10, 0x5e, 0xdd, 0x5f, 0x7f, 0x89, 0xef, 0xef, 0xfe, 0xb8, + 0x72, 0xf4, 0xcb, 0x2b, 0x47, 0xff, 0x73, 0xe5, 0xe8, 0x5f, 0x17, 0x8e, 0x76, 0xb9, 0x70, 0xb4, + 0xdf, 0x0b, 0x47, 0xfb, 0x5c, 0x9b, 0x0d, 0x06, 0x0d, 0xfa, 0x8f, 0x78, 0xfe, 0x3f, 0x00, 0x00, + 0xff, 0xff, 0x47, 0xbe, 0x47, 0xc0, 0x4b, 0x06, 0x00, 0x00, +} + +func (m *Change) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Change) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Change) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ChangeBlock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ChangeBlockHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Change != nil { + { + size := m.Change.Size() + i -= size + if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ChangeBlockHeaderChangeOfId) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockHeaderChangeOfId) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *ChangeBlockHeaderChangeOfType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockHeaderChangeOfType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintChanges(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *ChangeBlockHeaderChangeOfName) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockHeaderChangeOfName) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *ChangeBlockHeaderChangeOfIcon) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockHeaderChangeOfIcon) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Icon) + copy(dAtA[i:], m.Icon) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Icon))) + i-- + dAtA[i] = 0x22 + return len(dAtA) - i, nil +} +func (m *ChangeBlockHeaderChangeOfPermissions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockHeaderChangeOfPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Permissions != nil { + { + size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *ChangeBlockChildren) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockChildren) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockChildren) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Children) > 0 { + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Children[iNdEx]) + copy(dAtA[i:], m.Children[iNdEx]) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Children[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ChangeBlockContent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockContent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ChangeBlockContentPage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockContentPage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentPage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Change != nil { + { + size := m.Change.Size() + i -= size + if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ChangeBlockContentPageChangeOfStyle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentPageChangeOfStyle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintChanges(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentPageChangeOfBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentPageChangeOfBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Block != nil { + { + size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentDashboard) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockContentDashboard) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentDashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Change != nil { + { + size := m.Change.Size() + i -= size + if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ChangeBlockContentDashboardChangeOfStyle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentDashboardChangeOfStyle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintChanges(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentDashboardChangeOfHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentDashboardChangeOfHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentMedia) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockContentMedia) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentMedia) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Change != nil { + { + size := m.Change.Size() + i -= size + if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ChangeBlockContentMediaChangeOfLink) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentMediaChangeOfLink) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Link) + copy(dAtA[i:], m.Link) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Link))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentMediaChangeOfState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentMediaChangeOfState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintChanges(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentText) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangeBlockContentText) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentText) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Change != nil { + { + size := m.Change.Size() + i -= size + if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ChangeBlockContentTextChangeOfText) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfText) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Text) + copy(dAtA[i:], m.Text) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Text))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentTextChangeOfStyle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfStyle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintChanges(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentTextChangeOfMarks) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfMarks) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Marks != nil { + { + size, err := m.Marks.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentTextChangeOfToggleable) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfToggleable) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.Toggleable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentTextChangeOfMarkerType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfMarkerType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintChanges(dAtA, i, uint64(m.MarkerType)) + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentTextChangeOfCheckable) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfCheckable) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.Checkable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *ChangeBlockContentTextChangeOfChecked) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeBlockContentTextChangeOfChecked) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.Checked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + return len(dAtA) - i, nil +} +func (m *BlocksListSingleChange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlocksListSingleChange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Change != nil { + { + size := m.Change.Size() + i -= size + if _, err := m.Change.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Id) > 0 { + for iNdEx := len(m.Id) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Id[iNdEx]) + copy(dAtA[i:], m.Id[iNdEx]) + i = encodeVarintChanges(dAtA, i, uint64(len(m.Id[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *BlocksListSingleChangeChangeOfText) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChangeChangeOfText) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Text != nil { + { + size, err := m.Text.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *BlocksListSingleChangeChangeOfBlockHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChangeChangeOfBlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BlockHeader != nil { + { + size, err := m.BlockHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *BlocksListSingleChangeChangeOfBlockChildren) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChangeChangeOfBlockChildren) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BlockChildren != nil { + { + size, err := m.BlockChildren.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *BlocksListSingleChangeChangeOfPage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChangeChangeOfPage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Page != nil { + { + size, err := m.Page.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *BlocksListSingleChangeChangeOfDashboard) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChangeChangeOfDashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Dashboard != nil { + { + size, err := m.Dashboard.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *BlocksListSingleChangeChangeOfMedia) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksListSingleChangeChangeOfMedia) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Media != nil { + { + size, err := m.Media.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *BlockChanges) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockChanges) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Changes) > 0 { + for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChanges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintChanges(dAtA []byte, offset int, v uint64) int { + offset -= sovChanges(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Change) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ChangeBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ChangeBlockHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Change != nil { + n += m.Change.Size() + } + return n +} + +func (m *ChangeBlockHeaderChangeOfId) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + n += 1 + l + sovChanges(uint64(l)) + return n +} +func (m *ChangeBlockHeaderChangeOfType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovChanges(uint64(m.Type)) + return n +} +func (m *ChangeBlockHeaderChangeOfName) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovChanges(uint64(l)) + return n +} +func (m *ChangeBlockHeaderChangeOfIcon) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Icon) + n += 1 + l + sovChanges(uint64(l)) + return n +} +func (m *ChangeBlockHeaderChangeOfPermissions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Permissions != nil { + l = m.Permissions.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *ChangeBlockChildren) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Children) > 0 { + for _, s := range m.Children { + l = len(s) + n += 1 + l + sovChanges(uint64(l)) + } + } + return n +} + +func (m *ChangeBlockContent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ChangeBlockContentPage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Change != nil { + n += m.Change.Size() + } + return n +} + +func (m *ChangeBlockContentPageChangeOfStyle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovChanges(uint64(m.Style)) + return n +} +func (m *ChangeBlockContentPageChangeOfBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Block != nil { + l = m.Block.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *ChangeBlockContentDashboard) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Change != nil { + n += m.Change.Size() + } + return n +} + +func (m *ChangeBlockContentDashboardChangeOfStyle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovChanges(uint64(m.Style)) + return n +} +func (m *ChangeBlockContentDashboardChangeOfHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *ChangeBlockContentMedia) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Change != nil { + n += m.Change.Size() + } + return n +} + +func (m *ChangeBlockContentMediaChangeOfLink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Link) + n += 1 + l + sovChanges(uint64(l)) + return n +} +func (m *ChangeBlockContentMediaChangeOfState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovChanges(uint64(m.State)) + return n +} +func (m *ChangeBlockContentText) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Change != nil { + n += m.Change.Size() + } + return n +} + +func (m *ChangeBlockContentTextChangeOfText) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Text) + n += 1 + l + sovChanges(uint64(l)) + return n +} +func (m *ChangeBlockContentTextChangeOfStyle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovChanges(uint64(m.Style)) + return n +} +func (m *ChangeBlockContentTextChangeOfMarks) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Marks != nil { + l = m.Marks.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *ChangeBlockContentTextChangeOfToggleable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *ChangeBlockContentTextChangeOfMarkerType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovChanges(uint64(m.MarkerType)) + return n +} +func (m *ChangeBlockContentTextChangeOfCheckable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *ChangeBlockContentTextChangeOfChecked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *BlocksListSingleChange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, s := range m.Id { + l = len(s) + n += 1 + l + sovChanges(uint64(l)) + } + } + if m.Change != nil { + n += m.Change.Size() + } + return n +} + +func (m *BlocksListSingleChangeChangeOfText) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Text != nil { + l = m.Text.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *BlocksListSingleChangeChangeOfBlockHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeader != nil { + l = m.BlockHeader.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *BlocksListSingleChangeChangeOfBlockChildren) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockChildren != nil { + l = m.BlockChildren.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *BlocksListSingleChangeChangeOfPage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Page != nil { + l = m.Page.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *BlocksListSingleChangeChangeOfDashboard) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dashboard != nil { + l = m.Dashboard.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *BlocksListSingleChangeChangeOfMedia) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Media != nil { + l = m.Media.Size() + n += 1 + l + sovChanges(uint64(l)) + } + return n +} +func (m *BlockChanges) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Changes) > 0 { + for _, e := range m.Changes { + l = e.Size() + n += 1 + l + sovChanges(uint64(l)) + } + } + return n +} + +func sovChanges(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozChanges(x uint64) (n int) { + return sovChanges(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Change) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Change: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Change: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Change = &ChangeBlockHeaderChangeOfId{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v ModelBlockHeaderType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelBlockHeaderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Change = &ChangeBlockHeaderChangeOfType{v} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Change = &ChangeBlockHeaderChangeOfName{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Change = &ChangeBlockHeaderChangeOfIcon{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockHeaderPermissions{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &ChangeBlockHeaderChangeOfPermissions{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockChildren) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Children: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Children: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockContent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Content: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Content: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockContentPage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Page: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Page: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + var v ModelBlockContentPageStyle + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelBlockContentPageStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Change = &ChangeBlockContentPageChangeOfStyle{v} + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlock{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &ChangeBlockContentPageChangeOfBlock{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockContentDashboard) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Dashboard: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dashboard: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + var v ModelBlockContentDashboardStyle + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelBlockContentDashboardStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Change = &ChangeBlockContentDashboardChangeOfStyle{v} + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockHeader{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &ChangeBlockContentDashboardChangeOfHeader{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockContentMedia) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Media: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Media: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Change = &ChangeBlockContentMediaChangeOfLink{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v ModelBlockContentMediaState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelBlockContentMediaState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Change = &ChangeBlockContentMediaChangeOfState{v} + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangeBlockContentText) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Text: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Text: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Change = &ChangeBlockContentTextChangeOfText{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + var v ModelBlockContentTextStyle + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelBlockContentTextStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Change = &ChangeBlockContentTextChangeOfStyle{v} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Marks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentTextMarks{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &ChangeBlockContentTextChangeOfMarks{v} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Toggleable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Change = &ChangeBlockContentTextChangeOfToggleable{b} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MarkerType", wireType) + } + var v ModelBlockContentTextMarkerType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelBlockContentTextMarkerType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Change = &ChangeBlockContentTextChangeOfMarkerType{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Change = &ChangeBlockContentTextChangeOfCheckable{b} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Change = &ChangeBlockContentTextChangeOfChecked{b} + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlocksListSingleChange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlocksListSingleChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlocksListSingleChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = append(m.Id, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ChangeBlockContentText{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &BlocksListSingleChangeChangeOfText{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ChangeBlockHeader{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &BlocksListSingleChangeChangeOfBlockHeader{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockChildren", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ChangeBlockChildren{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &BlocksListSingleChangeChangeOfBlockChildren{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ChangeBlockContentPage{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &BlocksListSingleChangeChangeOfPage{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dashboard", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ChangeBlockContentDashboard{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &BlocksListSingleChangeChangeOfDashboard{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Media", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ChangeBlockContentMedia{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Change = &BlocksListSingleChangeChangeOfMedia{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockChanges) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockChanges: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockChanges: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChanges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChanges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChanges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Changes = append(m.Changes, &BlocksListSingleChange{}) + if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipChanges(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthChanges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipChanges(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowChanges + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowChanges + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowChanges + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthChanges + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupChanges + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthChanges + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthChanges = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowChanges = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupChanges = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pb/commands.pb.go b/pb/commands.pb.go new file mode 100644 index 000000000..ae1d68a0c --- /dev/null +++ b/pb/commands.pb.go @@ -0,0 +1,12667 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: commands.proto + +package pb + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type RpcBlockHistoryMoveResponseErrorCode int32 + +const ( + RpcBlockHistoryMoveResponseError_NULL RpcBlockHistoryMoveResponseErrorCode = 0 + RpcBlockHistoryMoveResponseError_UNKNOWN_ERROR RpcBlockHistoryMoveResponseErrorCode = 1 + RpcBlockHistoryMoveResponseError_BAD_INPUT RpcBlockHistoryMoveResponseErrorCode = 2 + RpcBlockHistoryMoveResponseError_CAN_NOT_MOVE RpcBlockHistoryMoveResponseErrorCode = 3 +) + +var RpcBlockHistoryMoveResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 3: "CAN_NOT_MOVE", +} + +var RpcBlockHistoryMoveResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "CAN_NOT_MOVE": 3, +} + +func (x RpcBlockHistoryMoveResponseErrorCode) String() string { + return proto.EnumName(RpcBlockHistoryMoveResponseErrorCode_name, int32(x)) +} + +func (RpcBlockHistoryMoveResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 0, 0, 1, 0, 0} +} + +type RpcBlockOpenResponseErrorCode int32 + +const ( + RpcBlockOpenResponseError_NULL RpcBlockOpenResponseErrorCode = 0 + RpcBlockOpenResponseError_UNKNOWN_ERROR RpcBlockOpenResponseErrorCode = 1 + RpcBlockOpenResponseError_BAD_INPUT RpcBlockOpenResponseErrorCode = 2 +) + +var RpcBlockOpenResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", +} + +var RpcBlockOpenResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, +} + +func (x RpcBlockOpenResponseErrorCode) String() string { + return proto.EnumName(RpcBlockOpenResponseErrorCode_name, int32(x)) +} + +func (RpcBlockOpenResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 1, 1, 0, 0} +} + +type RpcBlockCreateResponseErrorCode int32 + +const ( + RpcBlockCreateResponseError_NULL RpcBlockCreateResponseErrorCode = 0 + RpcBlockCreateResponseError_UNKNOWN_ERROR RpcBlockCreateResponseErrorCode = 1 + RpcBlockCreateResponseError_BAD_INPUT RpcBlockCreateResponseErrorCode = 2 +) + +var RpcBlockCreateResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", +} + +var RpcBlockCreateResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, +} + +func (x RpcBlockCreateResponseErrorCode) String() string { + return proto.EnumName(RpcBlockCreateResponseErrorCode_name, int32(x)) +} + +func (RpcBlockCreateResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 2, 1, 0, 0} +} + +type RpcBlockUpdateResponseErrorCode int32 + +const ( + RpcBlockUpdateResponseError_NULL RpcBlockUpdateResponseErrorCode = 0 + RpcBlockUpdateResponseError_UNKNOWN_ERROR RpcBlockUpdateResponseErrorCode = 1 + RpcBlockUpdateResponseError_BAD_INPUT RpcBlockUpdateResponseErrorCode = 2 +) + +var RpcBlockUpdateResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", +} + +var RpcBlockUpdateResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, +} + +func (x RpcBlockUpdateResponseErrorCode) String() string { + return proto.EnumName(RpcBlockUpdateResponseErrorCode_name, int32(x)) +} + +func (RpcBlockUpdateResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 3, 1, 0, 0} +} + +type RpcWalletCreateResponseErrorCode int32 + +const ( + RpcWalletCreateResponseError_NULL RpcWalletCreateResponseErrorCode = 0 + RpcWalletCreateResponseError_UNKNOWN_ERROR RpcWalletCreateResponseErrorCode = 1 + RpcWalletCreateResponseError_BAD_INPUT RpcWalletCreateResponseErrorCode = 2 + RpcWalletCreateResponseError_FAILED_TO_CREATE_LOCAL_REPO RpcWalletCreateResponseErrorCode = 101 +) + +var RpcWalletCreateResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "FAILED_TO_CREATE_LOCAL_REPO", +} + +var RpcWalletCreateResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "FAILED_TO_CREATE_LOCAL_REPO": 101, +} + +func (x RpcWalletCreateResponseErrorCode) String() string { + return proto.EnumName(RpcWalletCreateResponseErrorCode_name, int32(x)) +} + +func (RpcWalletCreateResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 0, 1, 0, 0} +} + +type RpcWalletRecoverResponseErrorCode int32 + +const ( + RpcWalletRecoverResponseError_NULL RpcWalletRecoverResponseErrorCode = 0 + RpcWalletRecoverResponseError_UNKNOWN_ERROR RpcWalletRecoverResponseErrorCode = 1 + RpcWalletRecoverResponseError_BAD_INPUT RpcWalletRecoverResponseErrorCode = 2 + RpcWalletRecoverResponseError_FAILED_TO_CREATE_LOCAL_REPO RpcWalletRecoverResponseErrorCode = 101 +) + +var RpcWalletRecoverResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "FAILED_TO_CREATE_LOCAL_REPO", +} + +var RpcWalletRecoverResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "FAILED_TO_CREATE_LOCAL_REPO": 101, +} + +func (x RpcWalletRecoverResponseErrorCode) String() string { + return proto.EnumName(RpcWalletRecoverResponseErrorCode_name, int32(x)) +} + +func (RpcWalletRecoverResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 1, 1, 0, 0} +} + +type RpcAccountCreateResponseErrorCode int32 + +const ( + RpcAccountCreateResponseError_NULL RpcAccountCreateResponseErrorCode = 0 + RpcAccountCreateResponseError_UNKNOWN_ERROR RpcAccountCreateResponseErrorCode = 1 + RpcAccountCreateResponseError_BAD_INPUT RpcAccountCreateResponseErrorCode = 2 + RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE RpcAccountCreateResponseErrorCode = 101 + RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME RpcAccountCreateResponseErrorCode = 102 + RpcAccountCreateResponseError_ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR RpcAccountCreateResponseErrorCode = 103 +) + +var RpcAccountCreateResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE", + 102: "ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME", + 103: "ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR", +} + +var RpcAccountCreateResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE": 101, + "ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME": 102, + "ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR": 103, +} + +func (x RpcAccountCreateResponseErrorCode) String() string { + return proto.EnumName(RpcAccountCreateResponseErrorCode_name, int32(x)) +} + +func (RpcAccountCreateResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 0, 1, 0, 0} +} + +type RpcAccountRecoverResponseErrorCode int32 + +const ( + RpcAccountRecoverResponseError_NULL RpcAccountRecoverResponseErrorCode = 0 + RpcAccountRecoverResponseError_UNKNOWN_ERROR RpcAccountRecoverResponseErrorCode = 1 + RpcAccountRecoverResponseError_BAD_INPUT RpcAccountRecoverResponseErrorCode = 2 + RpcAccountRecoverResponseError_NO_ACCOUNTS_FOUND RpcAccountRecoverResponseErrorCode = 101 + RpcAccountRecoverResponseError_NEED_TO_RECOVER_WALLET_FIRST RpcAccountRecoverResponseErrorCode = 102 + RpcAccountRecoverResponseError_FAILED_TO_CREATE_LOCAL_REPO RpcAccountRecoverResponseErrorCode = 103 + RpcAccountRecoverResponseError_LOCAL_REPO_EXISTS_BUT_CORRUPTED RpcAccountRecoverResponseErrorCode = 104 + RpcAccountRecoverResponseError_FAILED_TO_RUN_NODE RpcAccountRecoverResponseErrorCode = 105 + RpcAccountRecoverResponseError_WALLET_RECOVER_NOT_PERFORMED RpcAccountRecoverResponseErrorCode = 106 +) + +var RpcAccountRecoverResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "NO_ACCOUNTS_FOUND", + 102: "NEED_TO_RECOVER_WALLET_FIRST", + 103: "FAILED_TO_CREATE_LOCAL_REPO", + 104: "LOCAL_REPO_EXISTS_BUT_CORRUPTED", + 105: "FAILED_TO_RUN_NODE", + 106: "WALLET_RECOVER_NOT_PERFORMED", +} + +var RpcAccountRecoverResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "NO_ACCOUNTS_FOUND": 101, + "NEED_TO_RECOVER_WALLET_FIRST": 102, + "FAILED_TO_CREATE_LOCAL_REPO": 103, + "LOCAL_REPO_EXISTS_BUT_CORRUPTED": 104, + "FAILED_TO_RUN_NODE": 105, + "WALLET_RECOVER_NOT_PERFORMED": 106, +} + +func (x RpcAccountRecoverResponseErrorCode) String() string { + return proto.EnumName(RpcAccountRecoverResponseErrorCode_name, int32(x)) +} + +func (RpcAccountRecoverResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 1, 1, 0, 0} +} + +type RpcAccountSelectResponseErrorCode int32 + +const ( + RpcAccountSelectResponseError_NULL RpcAccountSelectResponseErrorCode = 0 + RpcAccountSelectResponseError_UNKNOWN_ERROR RpcAccountSelectResponseErrorCode = 1 + RpcAccountSelectResponseError_BAD_INPUT RpcAccountSelectResponseErrorCode = 2 + RpcAccountSelectResponseError_FAILED_TO_CREATE_LOCAL_REPO RpcAccountSelectResponseErrorCode = 101 + RpcAccountSelectResponseError_LOCAL_REPO_EXISTS_BUT_CORRUPTED RpcAccountSelectResponseErrorCode = 102 + RpcAccountSelectResponseError_FAILED_TO_RUN_NODE RpcAccountSelectResponseErrorCode = 103 + RpcAccountSelectResponseError_FAILED_TO_FIND_ACCOUNT_INFO RpcAccountSelectResponseErrorCode = 104 + RpcAccountSelectResponseError_LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET RpcAccountSelectResponseErrorCode = 105 +) + +var RpcAccountSelectResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "FAILED_TO_CREATE_LOCAL_REPO", + 102: "LOCAL_REPO_EXISTS_BUT_CORRUPTED", + 103: "FAILED_TO_RUN_NODE", + 104: "FAILED_TO_FIND_ACCOUNT_INFO", + 105: "LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET", +} + +var RpcAccountSelectResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "FAILED_TO_CREATE_LOCAL_REPO": 101, + "LOCAL_REPO_EXISTS_BUT_CORRUPTED": 102, + "FAILED_TO_RUN_NODE": 103, + "FAILED_TO_FIND_ACCOUNT_INFO": 104, + "LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET": 105, +} + +func (x RpcAccountSelectResponseErrorCode) String() string { + return proto.EnumName(RpcAccountSelectResponseErrorCode_name, int32(x)) +} + +func (RpcAccountSelectResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 2, 1, 0, 0} +} + +type RpcVersionGetResponseErrorCode int32 + +const ( + RpcVersionGetResponseError_NULL RpcVersionGetResponseErrorCode = 0 + RpcVersionGetResponseError_UNKNOWN_ERROR RpcVersionGetResponseErrorCode = 1 + RpcVersionGetResponseError_BAD_INPUT RpcVersionGetResponseErrorCode = 2 + RpcVersionGetResponseError_VERSION_IS_EMPTY RpcVersionGetResponseErrorCode = 3 + RpcVersionGetResponseError_NOT_FOUND RpcVersionGetResponseErrorCode = 101 + RpcVersionGetResponseError_TIMEOUT RpcVersionGetResponseErrorCode = 102 +) + +var RpcVersionGetResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 3: "VERSION_IS_EMPTY", + 101: "NOT_FOUND", + 102: "TIMEOUT", +} + +var RpcVersionGetResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "VERSION_IS_EMPTY": 3, + "NOT_FOUND": 101, + "TIMEOUT": 102, +} + +func (x RpcVersionGetResponseErrorCode) String() string { + return proto.EnumName(RpcVersionGetResponseErrorCode_name, int32(x)) +} + +func (RpcVersionGetResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 3, 0, 1, 0, 0} +} + +type RpcLogSendRequestLevel int32 + +const ( + RpcLogSendRequest_DEBUG RpcLogSendRequestLevel = 0 + RpcLogSendRequest_ERROR RpcLogSendRequestLevel = 1 + RpcLogSendRequest_FATAL RpcLogSendRequestLevel = 2 + RpcLogSendRequest_INFO RpcLogSendRequestLevel = 3 + RpcLogSendRequest_PANIC RpcLogSendRequestLevel = 4 + RpcLogSendRequest_WARNING RpcLogSendRequestLevel = 5 +) + +var RpcLogSendRequestLevel_name = map[int32]string{ + 0: "DEBUG", + 1: "ERROR", + 2: "FATAL", + 3: "INFO", + 4: "PANIC", + 5: "WARNING", +} + +var RpcLogSendRequestLevel_value = map[string]int32{ + "DEBUG": 0, + "ERROR": 1, + "FATAL": 2, + "INFO": 3, + "PANIC": 4, + "WARNING": 5, +} + +func (x RpcLogSendRequestLevel) String() string { + return proto.EnumName(RpcLogSendRequestLevel_name, int32(x)) +} + +func (RpcLogSendRequestLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4, 0, 0, 0} +} + +type RpcLogSendResponseErrorCode int32 + +const ( + RpcLogSendResponseError_NULL RpcLogSendResponseErrorCode = 0 + RpcLogSendResponseError_UNKNOWN_ERROR RpcLogSendResponseErrorCode = 1 + RpcLogSendResponseError_BAD_INPUT RpcLogSendResponseErrorCode = 2 + RpcLogSendResponseError_NOT_FOUND RpcLogSendResponseErrorCode = 101 + RpcLogSendResponseError_TIMEOUT RpcLogSendResponseErrorCode = 102 +) + +var RpcLogSendResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "NOT_FOUND", + 102: "TIMEOUT", +} + +var RpcLogSendResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "NOT_FOUND": 101, + "TIMEOUT": 102, +} + +func (x RpcLogSendResponseErrorCode) String() string { + return proto.EnumName(RpcLogSendResponseErrorCode_name, int32(x)) +} + +func (RpcLogSendResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4, 0, 1, 0, 0} +} + +type RpcIpfsGetFileResponseErrorCode int32 + +const ( + RpcIpfsGetFileResponseError_NULL RpcIpfsGetFileResponseErrorCode = 0 + RpcIpfsGetFileResponseError_UNKNOWN_ERROR RpcIpfsGetFileResponseErrorCode = 1 + RpcIpfsGetFileResponseError_BAD_INPUT RpcIpfsGetFileResponseErrorCode = 2 + RpcIpfsGetFileResponseError_NOT_FOUND RpcIpfsGetFileResponseErrorCode = 101 + RpcIpfsGetFileResponseError_TIMEOUT RpcIpfsGetFileResponseErrorCode = 102 +) + +var RpcIpfsGetFileResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "NOT_FOUND", + 102: "TIMEOUT", +} + +var RpcIpfsGetFileResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "NOT_FOUND": 101, + "TIMEOUT": 102, +} + +func (x RpcIpfsGetFileResponseErrorCode) String() string { + return proto.EnumName(RpcIpfsGetFileResponseErrorCode_name, int32(x)) +} + +func (RpcIpfsGetFileResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5, 0, 0, 1, 0, 0} +} + +type RpcImageGetBlobResponseErrorCode int32 + +const ( + RpcImageGetBlobResponseError_NULL RpcImageGetBlobResponseErrorCode = 0 + RpcImageGetBlobResponseError_UNKNOWN_ERROR RpcImageGetBlobResponseErrorCode = 1 + RpcImageGetBlobResponseError_BAD_INPUT RpcImageGetBlobResponseErrorCode = 2 + RpcImageGetBlobResponseError_NOT_FOUND RpcImageGetBlobResponseErrorCode = 101 + RpcImageGetBlobResponseError_TIMEOUT RpcImageGetBlobResponseErrorCode = 102 +) + +var RpcImageGetBlobResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "NOT_FOUND", + 102: "TIMEOUT", +} + +var RpcImageGetBlobResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "NOT_FOUND": 101, + "TIMEOUT": 102, +} + +func (x RpcImageGetBlobResponseErrorCode) String() string { + return proto.EnumName(RpcImageGetBlobResponseErrorCode_name, int32(x)) +} + +func (RpcImageGetBlobResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 0, 1, 0, 0} +} + +type RpcImageGetFileResponseErrorCode int32 + +const ( + RpcImageGetFileResponseError_NULL RpcImageGetFileResponseErrorCode = 0 + RpcImageGetFileResponseError_UNKNOWN_ERROR RpcImageGetFileResponseErrorCode = 1 + RpcImageGetFileResponseError_BAD_INPUT RpcImageGetFileResponseErrorCode = 2 + RpcImageGetFileResponseError_NOT_FOUND RpcImageGetFileResponseErrorCode = 101 + RpcImageGetFileResponseError_TIMEOUT RpcImageGetFileResponseErrorCode = 102 +) + +var RpcImageGetFileResponseErrorCode_name = map[int32]string{ + 0: "NULL", + 1: "UNKNOWN_ERROR", + 2: "BAD_INPUT", + 101: "NOT_FOUND", + 102: "TIMEOUT", +} + +var RpcImageGetFileResponseErrorCode_value = map[string]int32{ + "NULL": 0, + "UNKNOWN_ERROR": 1, + "BAD_INPUT": 2, + "NOT_FOUND": 101, + "TIMEOUT": 102, +} + +func (x RpcImageGetFileResponseErrorCode) String() string { + return proto.EnumName(RpcImageGetFileResponseErrorCode_name, int32(x)) +} + +func (RpcImageGetFileResponseErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 1, 1, 0, 0} +} + +type Rpc struct { +} + +func (m *Rpc) Reset() { *m = Rpc{} } +func (m *Rpc) String() string { return proto.CompactTextString(m) } +func (*Rpc) ProtoMessage() {} +func (*Rpc) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0} +} +func (m *Rpc) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Rpc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Rpc.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Rpc) XXX_Merge(src proto.Message) { + xxx_messageInfo_Rpc.Merge(m, src) +} +func (m *Rpc) XXX_Size() int { + return m.Size() +} +func (m *Rpc) XXX_DiscardUnknown() { + xxx_messageInfo_Rpc.DiscardUnknown(m) +} + +var xxx_messageInfo_Rpc proto.InternalMessageInfo + +type RpcBlock struct { +} + +func (m *RpcBlock) Reset() { *m = RpcBlock{} } +func (m *RpcBlock) String() string { return proto.CompactTextString(m) } +func (*RpcBlock) ProtoMessage() {} +func (*RpcBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0} +} +func (m *RpcBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlock.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlock.Merge(m, src) +} +func (m *RpcBlock) XXX_Size() int { + return m.Size() +} +func (m *RpcBlock) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlock proto.InternalMessageInfo + +type RpcBlockHistory struct { +} + +func (m *RpcBlockHistory) Reset() { *m = RpcBlockHistory{} } +func (m *RpcBlockHistory) String() string { return proto.CompactTextString(m) } +func (*RpcBlockHistory) ProtoMessage() {} +func (*RpcBlockHistory) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 0} +} +func (m *RpcBlockHistory) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockHistory.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockHistory) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockHistory.Merge(m, src) +} +func (m *RpcBlockHistory) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockHistory) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockHistory.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockHistory proto.InternalMessageInfo + +type RpcBlockHistoryMove struct { +} + +func (m *RpcBlockHistoryMove) Reset() { *m = RpcBlockHistoryMove{} } +func (m *RpcBlockHistoryMove) String() string { return proto.CompactTextString(m) } +func (*RpcBlockHistoryMove) ProtoMessage() {} +func (*RpcBlockHistoryMove) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 0, 0} +} +func (m *RpcBlockHistoryMove) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockHistoryMove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockHistoryMove.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockHistoryMove) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockHistoryMove.Merge(m, src) +} +func (m *RpcBlockHistoryMove) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockHistoryMove) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockHistoryMove.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockHistoryMove proto.InternalMessageInfo + +type RpcBlockHistoryMoveRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ContextBlockId string `protobuf:"bytes,2,opt,name=contextBlockId,proto3" json:"contextBlockId,omitempty"` + MoveForward bool `protobuf:"varint,3,opt,name=moveForward,proto3" json:"moveForward,omitempty"` +} + +func (m *RpcBlockHistoryMoveRequest) Reset() { *m = RpcBlockHistoryMoveRequest{} } +func (m *RpcBlockHistoryMoveRequest) String() string { return proto.CompactTextString(m) } +func (*RpcBlockHistoryMoveRequest) ProtoMessage() {} +func (*RpcBlockHistoryMoveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 0, 0, 0} +} +func (m *RpcBlockHistoryMoveRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockHistoryMoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockHistoryMoveRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockHistoryMoveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockHistoryMoveRequest.Merge(m, src) +} +func (m *RpcBlockHistoryMoveRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockHistoryMoveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockHistoryMoveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockHistoryMoveRequest proto.InternalMessageInfo + +func (m *RpcBlockHistoryMoveRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RpcBlockHistoryMoveRequest) GetContextBlockId() string { + if m != nil { + return m.ContextBlockId + } + return "" +} + +func (m *RpcBlockHistoryMoveRequest) GetMoveForward() bool { + if m != nil { + return m.MoveForward + } + return false +} + +type RpcBlockHistoryMoveResponse struct { + Error *RpcBlockHistoryMoveResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *RpcBlockHistoryMoveResponse) Reset() { *m = RpcBlockHistoryMoveResponse{} } +func (m *RpcBlockHistoryMoveResponse) String() string { return proto.CompactTextString(m) } +func (*RpcBlockHistoryMoveResponse) ProtoMessage() {} +func (*RpcBlockHistoryMoveResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 0, 0, 1} +} +func (m *RpcBlockHistoryMoveResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockHistoryMoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockHistoryMoveResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockHistoryMoveResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockHistoryMoveResponse.Merge(m, src) +} +func (m *RpcBlockHistoryMoveResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockHistoryMoveResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockHistoryMoveResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockHistoryMoveResponse proto.InternalMessageInfo + +func (m *RpcBlockHistoryMoveResponse) GetError() *RpcBlockHistoryMoveResponseError { + if m != nil { + return m.Error + } + return nil +} + +type RpcBlockHistoryMoveResponseError struct { + Code RpcBlockHistoryMoveResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcBlockHistoryMoveResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcBlockHistoryMoveResponseError) Reset() { *m = RpcBlockHistoryMoveResponseError{} } +func (m *RpcBlockHistoryMoveResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcBlockHistoryMoveResponseError) ProtoMessage() {} +func (*RpcBlockHistoryMoveResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 0, 0, 1, 0} +} +func (m *RpcBlockHistoryMoveResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockHistoryMoveResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockHistoryMoveResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockHistoryMoveResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockHistoryMoveResponseError.Merge(m, src) +} +func (m *RpcBlockHistoryMoveResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockHistoryMoveResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockHistoryMoveResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockHistoryMoveResponseError proto.InternalMessageInfo + +func (m *RpcBlockHistoryMoveResponseError) GetCode() RpcBlockHistoryMoveResponseErrorCode { + if m != nil { + return m.Code + } + return RpcBlockHistoryMoveResponseError_NULL +} + +func (m *RpcBlockHistoryMoveResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcBlockOpen struct { +} + +func (m *RpcBlockOpen) Reset() { *m = RpcBlockOpen{} } +func (m *RpcBlockOpen) String() string { return proto.CompactTextString(m) } +func (*RpcBlockOpen) ProtoMessage() {} +func (*RpcBlockOpen) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 1} +} +func (m *RpcBlockOpen) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockOpen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockOpen.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockOpen) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockOpen.Merge(m, src) +} +func (m *RpcBlockOpen) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockOpen) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockOpen.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockOpen proto.InternalMessageInfo + +type RpcBlockOpenRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *RpcBlockOpenRequest) Reset() { *m = RpcBlockOpenRequest{} } +func (m *RpcBlockOpenRequest) String() string { return proto.CompactTextString(m) } +func (*RpcBlockOpenRequest) ProtoMessage() {} +func (*RpcBlockOpenRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 1, 0} +} +func (m *RpcBlockOpenRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockOpenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockOpenRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockOpenRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockOpenRequest.Merge(m, src) +} +func (m *RpcBlockOpenRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockOpenRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockOpenRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockOpenRequest proto.InternalMessageInfo + +func (m *RpcBlockOpenRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type RpcBlockOpenResponse struct { + Error *RpcBlockOpenResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + BlockHeader *ModelBlockHeader `protobuf:"bytes,2,opt,name=blockHeader,proto3" json:"blockHeader,omitempty"` +} + +func (m *RpcBlockOpenResponse) Reset() { *m = RpcBlockOpenResponse{} } +func (m *RpcBlockOpenResponse) String() string { return proto.CompactTextString(m) } +func (*RpcBlockOpenResponse) ProtoMessage() {} +func (*RpcBlockOpenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 1, 1} +} +func (m *RpcBlockOpenResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockOpenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockOpenResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockOpenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockOpenResponse.Merge(m, src) +} +func (m *RpcBlockOpenResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockOpenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockOpenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockOpenResponse proto.InternalMessageInfo + +func (m *RpcBlockOpenResponse) GetError() *RpcBlockOpenResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcBlockOpenResponse) GetBlockHeader() *ModelBlockHeader { + if m != nil { + return m.BlockHeader + } + return nil +} + +type RpcBlockOpenResponseError struct { + Code RpcBlockOpenResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcBlockOpenResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcBlockOpenResponseError) Reset() { *m = RpcBlockOpenResponseError{} } +func (m *RpcBlockOpenResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcBlockOpenResponseError) ProtoMessage() {} +func (*RpcBlockOpenResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 1, 1, 0} +} +func (m *RpcBlockOpenResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockOpenResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockOpenResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockOpenResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockOpenResponseError.Merge(m, src) +} +func (m *RpcBlockOpenResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockOpenResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockOpenResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockOpenResponseError proto.InternalMessageInfo + +func (m *RpcBlockOpenResponseError) GetCode() RpcBlockOpenResponseErrorCode { + if m != nil { + return m.Code + } + return RpcBlockOpenResponseError_NULL +} + +func (m *RpcBlockOpenResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcBlockCreate struct { +} + +func (m *RpcBlockCreate) Reset() { *m = RpcBlockCreate{} } +func (m *RpcBlockCreate) String() string { return proto.CompactTextString(m) } +func (*RpcBlockCreate) ProtoMessage() {} +func (*RpcBlockCreate) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 2} +} +func (m *RpcBlockCreate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockCreate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockCreate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockCreate.Merge(m, src) +} +func (m *RpcBlockCreate) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockCreate) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockCreate.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockCreate proto.InternalMessageInfo + +type RpcBlockCreateRequest struct { + Type ModelBlockHeaderType `protobuf:"varint,1,opt,name=type,proto3,enum=anytype.ModelBlockHeaderType" json:"type,omitempty"` + ContextBlockId string `protobuf:"bytes,2,opt,name=contextBlockId,proto3" json:"contextBlockId,omitempty"` +} + +func (m *RpcBlockCreateRequest) Reset() { *m = RpcBlockCreateRequest{} } +func (m *RpcBlockCreateRequest) String() string { return proto.CompactTextString(m) } +func (*RpcBlockCreateRequest) ProtoMessage() {} +func (*RpcBlockCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 2, 0} +} +func (m *RpcBlockCreateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockCreateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockCreateRequest.Merge(m, src) +} +func (m *RpcBlockCreateRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockCreateRequest proto.InternalMessageInfo + +func (m *RpcBlockCreateRequest) GetType() ModelBlockHeaderType { + if m != nil { + return m.Type + } + return ModelBlockHeader_DASHBOARD +} + +func (m *RpcBlockCreateRequest) GetContextBlockId() string { + if m != nil { + return m.ContextBlockId + } + return "" +} + +type RpcBlockCreateResponse struct { + Error *RpcBlockCreateResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *RpcBlockCreateResponse) Reset() { *m = RpcBlockCreateResponse{} } +func (m *RpcBlockCreateResponse) String() string { return proto.CompactTextString(m) } +func (*RpcBlockCreateResponse) ProtoMessage() {} +func (*RpcBlockCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 2, 1} +} +func (m *RpcBlockCreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockCreateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockCreateResponse.Merge(m, src) +} +func (m *RpcBlockCreateResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockCreateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockCreateResponse proto.InternalMessageInfo + +func (m *RpcBlockCreateResponse) GetError() *RpcBlockCreateResponseError { + if m != nil { + return m.Error + } + return nil +} + +type RpcBlockCreateResponseError struct { + Code RpcBlockCreateResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcBlockCreateResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcBlockCreateResponseError) Reset() { *m = RpcBlockCreateResponseError{} } +func (m *RpcBlockCreateResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcBlockCreateResponseError) ProtoMessage() {} +func (*RpcBlockCreateResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 2, 1, 0} +} +func (m *RpcBlockCreateResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockCreateResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockCreateResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockCreateResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockCreateResponseError.Merge(m, src) +} +func (m *RpcBlockCreateResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockCreateResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockCreateResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockCreateResponseError proto.InternalMessageInfo + +func (m *RpcBlockCreateResponseError) GetCode() RpcBlockCreateResponseErrorCode { + if m != nil { + return m.Code + } + return RpcBlockCreateResponseError_NULL +} + +func (m *RpcBlockCreateResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcBlockUpdate struct { +} + +func (m *RpcBlockUpdate) Reset() { *m = RpcBlockUpdate{} } +func (m *RpcBlockUpdate) String() string { return proto.CompactTextString(m) } +func (*RpcBlockUpdate) ProtoMessage() {} +func (*RpcBlockUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 3} +} +func (m *RpcBlockUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockUpdate.Merge(m, src) +} +func (m *RpcBlockUpdate) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockUpdate proto.InternalMessageInfo + +type RpcBlockUpdateRequest struct { + Changes *BlockChanges `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"` +} + +func (m *RpcBlockUpdateRequest) Reset() { *m = RpcBlockUpdateRequest{} } +func (m *RpcBlockUpdateRequest) String() string { return proto.CompactTextString(m) } +func (*RpcBlockUpdateRequest) ProtoMessage() {} +func (*RpcBlockUpdateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 3, 0} +} +func (m *RpcBlockUpdateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockUpdateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockUpdateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockUpdateRequest.Merge(m, src) +} +func (m *RpcBlockUpdateRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockUpdateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockUpdateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockUpdateRequest proto.InternalMessageInfo + +func (m *RpcBlockUpdateRequest) GetChanges() *BlockChanges { + if m != nil { + return m.Changes + } + return nil +} + +type RpcBlockUpdateResponse struct { + Error *RpcBlockUpdateResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *RpcBlockUpdateResponse) Reset() { *m = RpcBlockUpdateResponse{} } +func (m *RpcBlockUpdateResponse) String() string { return proto.CompactTextString(m) } +func (*RpcBlockUpdateResponse) ProtoMessage() {} +func (*RpcBlockUpdateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 3, 1} +} +func (m *RpcBlockUpdateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockUpdateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockUpdateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockUpdateResponse.Merge(m, src) +} +func (m *RpcBlockUpdateResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockUpdateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockUpdateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockUpdateResponse proto.InternalMessageInfo + +func (m *RpcBlockUpdateResponse) GetError() *RpcBlockUpdateResponseError { + if m != nil { + return m.Error + } + return nil +} + +type RpcBlockUpdateResponseError struct { + Code RpcBlockUpdateResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcBlockUpdateResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcBlockUpdateResponseError) Reset() { *m = RpcBlockUpdateResponseError{} } +func (m *RpcBlockUpdateResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcBlockUpdateResponseError) ProtoMessage() {} +func (*RpcBlockUpdateResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 0, 3, 1, 0} +} +func (m *RpcBlockUpdateResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcBlockUpdateResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcBlockUpdateResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcBlockUpdateResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcBlockUpdateResponseError.Merge(m, src) +} +func (m *RpcBlockUpdateResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcBlockUpdateResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcBlockUpdateResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcBlockUpdateResponseError proto.InternalMessageInfo + +func (m *RpcBlockUpdateResponseError) GetCode() RpcBlockUpdateResponseErrorCode { + if m != nil { + return m.Code + } + return RpcBlockUpdateResponseError_NULL +} + +func (m *RpcBlockUpdateResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcWallet struct { +} + +func (m *RpcWallet) Reset() { *m = RpcWallet{} } +func (m *RpcWallet) String() string { return proto.CompactTextString(m) } +func (*RpcWallet) ProtoMessage() {} +func (*RpcWallet) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1} +} +func (m *RpcWallet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWallet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWallet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWallet) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWallet.Merge(m, src) +} +func (m *RpcWallet) XXX_Size() int { + return m.Size() +} +func (m *RpcWallet) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWallet.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWallet proto.InternalMessageInfo + +type RpcWalletCreate struct { +} + +func (m *RpcWalletCreate) Reset() { *m = RpcWalletCreate{} } +func (m *RpcWalletCreate) String() string { return proto.CompactTextString(m) } +func (*RpcWalletCreate) ProtoMessage() {} +func (*RpcWalletCreate) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 0} +} +func (m *RpcWalletCreate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletCreate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletCreate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletCreate.Merge(m, src) +} +func (m *RpcWalletCreate) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletCreate) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletCreate.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletCreate proto.InternalMessageInfo + +//* +// Front-end-to-middleware request to create a new wallet +type RpcWalletCreateRequest struct { + RootPath string `protobuf:"bytes,1,opt,name=rootPath,proto3" json:"rootPath,omitempty"` +} + +func (m *RpcWalletCreateRequest) Reset() { *m = RpcWalletCreateRequest{} } +func (m *RpcWalletCreateRequest) String() string { return proto.CompactTextString(m) } +func (*RpcWalletCreateRequest) ProtoMessage() {} +func (*RpcWalletCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 0, 0} +} +func (m *RpcWalletCreateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletCreateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletCreateRequest.Merge(m, src) +} +func (m *RpcWalletCreateRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletCreateRequest proto.InternalMessageInfo + +func (m *RpcWalletCreateRequest) GetRootPath() string { + if m != nil { + return m.RootPath + } + return "" +} + +//* +// Middleware-to-front-end response, that can contain mnemonic of a created account and a NULL error or an empty mnemonic and a non-NULL error +type RpcWalletCreateResponse struct { + Error *RpcWalletCreateResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` +} + +func (m *RpcWalletCreateResponse) Reset() { *m = RpcWalletCreateResponse{} } +func (m *RpcWalletCreateResponse) String() string { return proto.CompactTextString(m) } +func (*RpcWalletCreateResponse) ProtoMessage() {} +func (*RpcWalletCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 0, 1} +} +func (m *RpcWalletCreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletCreateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletCreateResponse.Merge(m, src) +} +func (m *RpcWalletCreateResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletCreateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletCreateResponse proto.InternalMessageInfo + +func (m *RpcWalletCreateResponse) GetError() *RpcWalletCreateResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcWalletCreateResponse) GetMnemonic() string { + if m != nil { + return m.Mnemonic + } + return "" +} + +type RpcWalletCreateResponseError struct { + Code RpcWalletCreateResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcWalletCreateResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcWalletCreateResponseError) Reset() { *m = RpcWalletCreateResponseError{} } +func (m *RpcWalletCreateResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcWalletCreateResponseError) ProtoMessage() {} +func (*RpcWalletCreateResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 0, 1, 0} +} +func (m *RpcWalletCreateResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletCreateResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletCreateResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletCreateResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletCreateResponseError.Merge(m, src) +} +func (m *RpcWalletCreateResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletCreateResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletCreateResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletCreateResponseError proto.InternalMessageInfo + +func (m *RpcWalletCreateResponseError) GetCode() RpcWalletCreateResponseErrorCode { + if m != nil { + return m.Code + } + return RpcWalletCreateResponseError_NULL +} + +func (m *RpcWalletCreateResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcWalletRecover struct { +} + +func (m *RpcWalletRecover) Reset() { *m = RpcWalletRecover{} } +func (m *RpcWalletRecover) String() string { return proto.CompactTextString(m) } +func (*RpcWalletRecover) ProtoMessage() {} +func (*RpcWalletRecover) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 1} +} +func (m *RpcWalletRecover) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletRecover) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletRecover.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletRecover) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletRecover.Merge(m, src) +} +func (m *RpcWalletRecover) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletRecover) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletRecover.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletRecover proto.InternalMessageInfo + +//* +// Front end to middleware request-to-recover-a wallet with this mnemonic and a rootPath +type RpcWalletRecoverRequest struct { + RootPath string `protobuf:"bytes,1,opt,name=rootPath,proto3" json:"rootPath,omitempty"` + Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` +} + +func (m *RpcWalletRecoverRequest) Reset() { *m = RpcWalletRecoverRequest{} } +func (m *RpcWalletRecoverRequest) String() string { return proto.CompactTextString(m) } +func (*RpcWalletRecoverRequest) ProtoMessage() {} +func (*RpcWalletRecoverRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 1, 0} +} +func (m *RpcWalletRecoverRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletRecoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletRecoverRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletRecoverRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletRecoverRequest.Merge(m, src) +} +func (m *RpcWalletRecoverRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletRecoverRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletRecoverRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletRecoverRequest proto.InternalMessageInfo + +func (m *RpcWalletRecoverRequest) GetRootPath() string { + if m != nil { + return m.RootPath + } + return "" +} + +func (m *RpcWalletRecoverRequest) GetMnemonic() string { + if m != nil { + return m.Mnemonic + } + return "" +} + +//* +// Middleware-to-front-end response, that can contain a NULL error or a non-NULL error +type RpcWalletRecoverResponse struct { + Error *RpcWalletRecoverResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *RpcWalletRecoverResponse) Reset() { *m = RpcWalletRecoverResponse{} } +func (m *RpcWalletRecoverResponse) String() string { return proto.CompactTextString(m) } +func (*RpcWalletRecoverResponse) ProtoMessage() {} +func (*RpcWalletRecoverResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 1, 1} +} +func (m *RpcWalletRecoverResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletRecoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletRecoverResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletRecoverResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletRecoverResponse.Merge(m, src) +} +func (m *RpcWalletRecoverResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletRecoverResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletRecoverResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletRecoverResponse proto.InternalMessageInfo + +func (m *RpcWalletRecoverResponse) GetError() *RpcWalletRecoverResponseError { + if m != nil { + return m.Error + } + return nil +} + +type RpcWalletRecoverResponseError struct { + Code RpcWalletRecoverResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcWalletRecoverResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcWalletRecoverResponseError) Reset() { *m = RpcWalletRecoverResponseError{} } +func (m *RpcWalletRecoverResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcWalletRecoverResponseError) ProtoMessage() {} +func (*RpcWalletRecoverResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 1, 1, 1, 0} +} +func (m *RpcWalletRecoverResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcWalletRecoverResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcWalletRecoverResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcWalletRecoverResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcWalletRecoverResponseError.Merge(m, src) +} +func (m *RpcWalletRecoverResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcWalletRecoverResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcWalletRecoverResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcWalletRecoverResponseError proto.InternalMessageInfo + +func (m *RpcWalletRecoverResponseError) GetCode() RpcWalletRecoverResponseErrorCode { + if m != nil { + return m.Code + } + return RpcWalletRecoverResponseError_NULL +} + +func (m *RpcWalletRecoverResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcAccount struct { +} + +func (m *RpcAccount) Reset() { *m = RpcAccount{} } +func (m *RpcAccount) String() string { return proto.CompactTextString(m) } +func (*RpcAccount) ProtoMessage() {} +func (*RpcAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2} +} +func (m *RpcAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccount.Merge(m, src) +} +func (m *RpcAccount) XXX_Size() int { + return m.Size() +} +func (m *RpcAccount) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccount proto.InternalMessageInfo + +type RpcAccountCreate struct { +} + +func (m *RpcAccountCreate) Reset() { *m = RpcAccountCreate{} } +func (m *RpcAccountCreate) String() string { return proto.CompactTextString(m) } +func (*RpcAccountCreate) ProtoMessage() {} +func (*RpcAccountCreate) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 0} +} +func (m *RpcAccountCreate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountCreate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountCreate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountCreate.Merge(m, src) +} +func (m *RpcAccountCreate) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountCreate) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountCreate.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountCreate proto.InternalMessageInfo + +//* +// Front end to middleware request-to-create-an account +type RpcAccountCreateRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to Avatar: + // *RpcAccountCreateRequestAvatarOfAvatarLocalPath + // *RpcAccountCreateRequestAvatarOfAvatarColor + Avatar isRpcAccountCreateRequestAvatar `protobuf_oneof:"avatar"` +} + +func (m *RpcAccountCreateRequest) Reset() { *m = RpcAccountCreateRequest{} } +func (m *RpcAccountCreateRequest) String() string { return proto.CompactTextString(m) } +func (*RpcAccountCreateRequest) ProtoMessage() {} +func (*RpcAccountCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 0, 0} +} +func (m *RpcAccountCreateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountCreateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountCreateRequest.Merge(m, src) +} +func (m *RpcAccountCreateRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountCreateRequest proto.InternalMessageInfo + +type isRpcAccountCreateRequestAvatar interface { + isRpcAccountCreateRequestAvatar() + MarshalTo([]byte) (int, error) + Size() int +} + +type RpcAccountCreateRequestAvatarOfAvatarLocalPath struct { + AvatarLocalPath string `protobuf:"bytes,2,opt,name=avatarLocalPath,proto3,oneof" json:"avatarLocalPath,omitempty"` +} +type RpcAccountCreateRequestAvatarOfAvatarColor struct { + AvatarColor string `protobuf:"bytes,3,opt,name=avatarColor,proto3,oneof" json:"avatarColor,omitempty"` +} + +func (*RpcAccountCreateRequestAvatarOfAvatarLocalPath) isRpcAccountCreateRequestAvatar() {} +func (*RpcAccountCreateRequestAvatarOfAvatarColor) isRpcAccountCreateRequestAvatar() {} + +func (m *RpcAccountCreateRequest) GetAvatar() isRpcAccountCreateRequestAvatar { + if m != nil { + return m.Avatar + } + return nil +} + +func (m *RpcAccountCreateRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *RpcAccountCreateRequest) GetAvatarLocalPath() string { + if x, ok := m.GetAvatar().(*RpcAccountCreateRequestAvatarOfAvatarLocalPath); ok { + return x.AvatarLocalPath + } + return "" +} + +func (m *RpcAccountCreateRequest) GetAvatarColor() string { + if x, ok := m.GetAvatar().(*RpcAccountCreateRequestAvatarOfAvatarColor); ok { + return x.AvatarColor + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RpcAccountCreateRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RpcAccountCreateRequestAvatarOfAvatarLocalPath)(nil), + (*RpcAccountCreateRequestAvatarOfAvatarColor)(nil), + } +} + +//* +// Middleware-to-front-end response for an account creation request, that can contain a NULL error and created account or a non-NULL error and an empty account +type RpcAccountCreateResponse struct { + Error *RpcAccountCreateResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Account *ModelAccount `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *RpcAccountCreateResponse) Reset() { *m = RpcAccountCreateResponse{} } +func (m *RpcAccountCreateResponse) String() string { return proto.CompactTextString(m) } +func (*RpcAccountCreateResponse) ProtoMessage() {} +func (*RpcAccountCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 0, 1} +} +func (m *RpcAccountCreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountCreateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountCreateResponse.Merge(m, src) +} +func (m *RpcAccountCreateResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountCreateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountCreateResponse proto.InternalMessageInfo + +func (m *RpcAccountCreateResponse) GetError() *RpcAccountCreateResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcAccountCreateResponse) GetAccount() *ModelAccount { + if m != nil { + return m.Account + } + return nil +} + +type RpcAccountCreateResponseError struct { + Code RpcAccountCreateResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcAccountCreateResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcAccountCreateResponseError) Reset() { *m = RpcAccountCreateResponseError{} } +func (m *RpcAccountCreateResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcAccountCreateResponseError) ProtoMessage() {} +func (*RpcAccountCreateResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 0, 1, 0} +} +func (m *RpcAccountCreateResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountCreateResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountCreateResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountCreateResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountCreateResponseError.Merge(m, src) +} +func (m *RpcAccountCreateResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountCreateResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountCreateResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountCreateResponseError proto.InternalMessageInfo + +func (m *RpcAccountCreateResponseError) GetCode() RpcAccountCreateResponseErrorCode { + if m != nil { + return m.Code + } + return RpcAccountCreateResponseError_NULL +} + +func (m *RpcAccountCreateResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcAccountRecover struct { +} + +func (m *RpcAccountRecover) Reset() { *m = RpcAccountRecover{} } +func (m *RpcAccountRecover) String() string { return proto.CompactTextString(m) } +func (*RpcAccountRecover) ProtoMessage() {} +func (*RpcAccountRecover) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 1} +} +func (m *RpcAccountRecover) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountRecover) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountRecover.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountRecover) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountRecover.Merge(m, src) +} +func (m *RpcAccountRecover) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountRecover) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountRecover.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountRecover proto.InternalMessageInfo + +//* +// Front end to middleware request-to-start-search of an accounts for a recovered mnemonic. +// Each of an account that would be found will come with an AccountAdd event +type RpcAccountRecoverRequest struct { +} + +func (m *RpcAccountRecoverRequest) Reset() { *m = RpcAccountRecoverRequest{} } +func (m *RpcAccountRecoverRequest) String() string { return proto.CompactTextString(m) } +func (*RpcAccountRecoverRequest) ProtoMessage() {} +func (*RpcAccountRecoverRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 1, 0} +} +func (m *RpcAccountRecoverRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountRecoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountRecoverRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountRecoverRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountRecoverRequest.Merge(m, src) +} +func (m *RpcAccountRecoverRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountRecoverRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountRecoverRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountRecoverRequest proto.InternalMessageInfo + +//* +// Middleware-to-front-end response to an account recover request, that can contain a NULL error and created account or a non-NULL error and an empty account +type RpcAccountRecoverResponse struct { + Error *RpcAccountRecoverResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *RpcAccountRecoverResponse) Reset() { *m = RpcAccountRecoverResponse{} } +func (m *RpcAccountRecoverResponse) String() string { return proto.CompactTextString(m) } +func (*RpcAccountRecoverResponse) ProtoMessage() {} +func (*RpcAccountRecoverResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 1, 1} +} +func (m *RpcAccountRecoverResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountRecoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountRecoverResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountRecoverResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountRecoverResponse.Merge(m, src) +} +func (m *RpcAccountRecoverResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountRecoverResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountRecoverResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountRecoverResponse proto.InternalMessageInfo + +func (m *RpcAccountRecoverResponse) GetError() *RpcAccountRecoverResponseError { + if m != nil { + return m.Error + } + return nil +} + +type RpcAccountRecoverResponseError struct { + Code RpcAccountRecoverResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcAccountRecoverResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcAccountRecoverResponseError) Reset() { *m = RpcAccountRecoverResponseError{} } +func (m *RpcAccountRecoverResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcAccountRecoverResponseError) ProtoMessage() {} +func (*RpcAccountRecoverResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 1, 1, 0} +} +func (m *RpcAccountRecoverResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountRecoverResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountRecoverResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountRecoverResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountRecoverResponseError.Merge(m, src) +} +func (m *RpcAccountRecoverResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountRecoverResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountRecoverResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountRecoverResponseError proto.InternalMessageInfo + +func (m *RpcAccountRecoverResponseError) GetCode() RpcAccountRecoverResponseErrorCode { + if m != nil { + return m.Code + } + return RpcAccountRecoverResponseError_NULL +} + +func (m *RpcAccountRecoverResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcAccountSelect struct { +} + +func (m *RpcAccountSelect) Reset() { *m = RpcAccountSelect{} } +func (m *RpcAccountSelect) String() string { return proto.CompactTextString(m) } +func (*RpcAccountSelect) ProtoMessage() {} +func (*RpcAccountSelect) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 2} +} +func (m *RpcAccountSelect) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountSelect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountSelect.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountSelect) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountSelect.Merge(m, src) +} +func (m *RpcAccountSelect) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountSelect) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountSelect.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountSelect proto.InternalMessageInfo + +//* +// Front end to middleware request-to-launch-a specific account using account id and a root path +// User can select an account from those, that came with an AccountAdd events +type RpcAccountSelectRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + RootPath string `protobuf:"bytes,2,opt,name=rootPath,proto3" json:"rootPath,omitempty"` +} + +func (m *RpcAccountSelectRequest) Reset() { *m = RpcAccountSelectRequest{} } +func (m *RpcAccountSelectRequest) String() string { return proto.CompactTextString(m) } +func (*RpcAccountSelectRequest) ProtoMessage() {} +func (*RpcAccountSelectRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 2, 0} +} +func (m *RpcAccountSelectRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountSelectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountSelectRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountSelectRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountSelectRequest.Merge(m, src) +} +func (m *RpcAccountSelectRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountSelectRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountSelectRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountSelectRequest proto.InternalMessageInfo + +func (m *RpcAccountSelectRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RpcAccountSelectRequest) GetRootPath() string { + if m != nil { + return m.RootPath + } + return "" +} + +//* +// Middleware-to-front-end response for an account select request, that can contain a NULL error and selected account or a non-NULL error and an empty account +type RpcAccountSelectResponse struct { + Error *RpcAccountSelectResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Account *ModelAccount `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *RpcAccountSelectResponse) Reset() { *m = RpcAccountSelectResponse{} } +func (m *RpcAccountSelectResponse) String() string { return proto.CompactTextString(m) } +func (*RpcAccountSelectResponse) ProtoMessage() {} +func (*RpcAccountSelectResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 2, 1} +} +func (m *RpcAccountSelectResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountSelectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountSelectResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountSelectResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountSelectResponse.Merge(m, src) +} +func (m *RpcAccountSelectResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountSelectResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountSelectResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountSelectResponse proto.InternalMessageInfo + +func (m *RpcAccountSelectResponse) GetError() *RpcAccountSelectResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcAccountSelectResponse) GetAccount() *ModelAccount { + if m != nil { + return m.Account + } + return nil +} + +type RpcAccountSelectResponseError struct { + Code RpcAccountSelectResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcAccountSelectResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcAccountSelectResponseError) Reset() { *m = RpcAccountSelectResponseError{} } +func (m *RpcAccountSelectResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcAccountSelectResponseError) ProtoMessage() {} +func (*RpcAccountSelectResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 2, 2, 1, 0} +} +func (m *RpcAccountSelectResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcAccountSelectResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcAccountSelectResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcAccountSelectResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcAccountSelectResponseError.Merge(m, src) +} +func (m *RpcAccountSelectResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcAccountSelectResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcAccountSelectResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcAccountSelectResponseError proto.InternalMessageInfo + +func (m *RpcAccountSelectResponseError) GetCode() RpcAccountSelectResponseErrorCode { + if m != nil { + return m.Code + } + return RpcAccountSelectResponseError_NULL +} + +func (m *RpcAccountSelectResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcVersion struct { +} + +func (m *RpcVersion) Reset() { *m = RpcVersion{} } +func (m *RpcVersion) String() string { return proto.CompactTextString(m) } +func (*RpcVersion) ProtoMessage() {} +func (*RpcVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 3} +} +func (m *RpcVersion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcVersion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcVersion.Merge(m, src) +} +func (m *RpcVersion) XXX_Size() int { + return m.Size() +} +func (m *RpcVersion) XXX_DiscardUnknown() { + xxx_messageInfo_RpcVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcVersion proto.InternalMessageInfo + +type RpcVersionGet struct { +} + +func (m *RpcVersionGet) Reset() { *m = RpcVersionGet{} } +func (m *RpcVersionGet) String() string { return proto.CompactTextString(m) } +func (*RpcVersionGet) ProtoMessage() {} +func (*RpcVersionGet) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 3, 0} +} +func (m *RpcVersionGet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcVersionGet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcVersionGet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcVersionGet) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcVersionGet.Merge(m, src) +} +func (m *RpcVersionGet) XXX_Size() int { + return m.Size() +} +func (m *RpcVersionGet) XXX_DiscardUnknown() { + xxx_messageInfo_RpcVersionGet.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcVersionGet proto.InternalMessageInfo + +type RpcVersionGetRequest struct { +} + +func (m *RpcVersionGetRequest) Reset() { *m = RpcVersionGetRequest{} } +func (m *RpcVersionGetRequest) String() string { return proto.CompactTextString(m) } +func (*RpcVersionGetRequest) ProtoMessage() {} +func (*RpcVersionGetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 3, 0, 0} +} +func (m *RpcVersionGetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcVersionGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcVersionGetRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcVersionGetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcVersionGetRequest.Merge(m, src) +} +func (m *RpcVersionGetRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcVersionGetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcVersionGetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcVersionGetRequest proto.InternalMessageInfo + +type RpcVersionGetResponse struct { + Error *RpcVersionGetResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (m *RpcVersionGetResponse) Reset() { *m = RpcVersionGetResponse{} } +func (m *RpcVersionGetResponse) String() string { return proto.CompactTextString(m) } +func (*RpcVersionGetResponse) ProtoMessage() {} +func (*RpcVersionGetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 3, 0, 1} +} +func (m *RpcVersionGetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcVersionGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcVersionGetResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcVersionGetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcVersionGetResponse.Merge(m, src) +} +func (m *RpcVersionGetResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcVersionGetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcVersionGetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcVersionGetResponse proto.InternalMessageInfo + +func (m *RpcVersionGetResponse) GetError() *RpcVersionGetResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcVersionGetResponse) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +type RpcVersionGetResponseError struct { + Code RpcVersionGetResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcVersionGetResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcVersionGetResponseError) Reset() { *m = RpcVersionGetResponseError{} } +func (m *RpcVersionGetResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcVersionGetResponseError) ProtoMessage() {} +func (*RpcVersionGetResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 3, 0, 1, 0} +} +func (m *RpcVersionGetResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcVersionGetResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcVersionGetResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcVersionGetResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcVersionGetResponseError.Merge(m, src) +} +func (m *RpcVersionGetResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcVersionGetResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcVersionGetResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcVersionGetResponseError proto.InternalMessageInfo + +func (m *RpcVersionGetResponseError) GetCode() RpcVersionGetResponseErrorCode { + if m != nil { + return m.Code + } + return RpcVersionGetResponseError_NULL +} + +func (m *RpcVersionGetResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcLog struct { +} + +func (m *RpcLog) Reset() { *m = RpcLog{} } +func (m *RpcLog) String() string { return proto.CompactTextString(m) } +func (*RpcLog) ProtoMessage() {} +func (*RpcLog) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4} +} +func (m *RpcLog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcLog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcLog.Merge(m, src) +} +func (m *RpcLog) XXX_Size() int { + return m.Size() +} +func (m *RpcLog) XXX_DiscardUnknown() { + xxx_messageInfo_RpcLog.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcLog proto.InternalMessageInfo + +type RpcLogSend struct { +} + +func (m *RpcLogSend) Reset() { *m = RpcLogSend{} } +func (m *RpcLogSend) String() string { return proto.CompactTextString(m) } +func (*RpcLogSend) ProtoMessage() {} +func (*RpcLogSend) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4, 0} +} +func (m *RpcLogSend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcLogSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcLogSend.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcLogSend) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcLogSend.Merge(m, src) +} +func (m *RpcLogSend) XXX_Size() int { + return m.Size() +} +func (m *RpcLogSend) XXX_DiscardUnknown() { + xxx_messageInfo_RpcLogSend.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcLogSend proto.InternalMessageInfo + +type RpcLogSendRequest struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Level RpcLogSendRequestLevel `protobuf:"varint,2,opt,name=level,proto3,enum=anytype.RpcLogSendRequestLevel" json:"level,omitempty"` +} + +func (m *RpcLogSendRequest) Reset() { *m = RpcLogSendRequest{} } +func (m *RpcLogSendRequest) String() string { return proto.CompactTextString(m) } +func (*RpcLogSendRequest) ProtoMessage() {} +func (*RpcLogSendRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4, 0, 0} +} +func (m *RpcLogSendRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcLogSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcLogSendRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcLogSendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcLogSendRequest.Merge(m, src) +} +func (m *RpcLogSendRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcLogSendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcLogSendRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcLogSendRequest proto.InternalMessageInfo + +func (m *RpcLogSendRequest) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *RpcLogSendRequest) GetLevel() RpcLogSendRequestLevel { + if m != nil { + return m.Level + } + return RpcLogSendRequest_DEBUG +} + +type RpcLogSendResponse struct { + Error *RpcLogSendResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *RpcLogSendResponse) Reset() { *m = RpcLogSendResponse{} } +func (m *RpcLogSendResponse) String() string { return proto.CompactTextString(m) } +func (*RpcLogSendResponse) ProtoMessage() {} +func (*RpcLogSendResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4, 0, 1} +} +func (m *RpcLogSendResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcLogSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcLogSendResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcLogSendResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcLogSendResponse.Merge(m, src) +} +func (m *RpcLogSendResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcLogSendResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcLogSendResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcLogSendResponse proto.InternalMessageInfo + +func (m *RpcLogSendResponse) GetError() *RpcLogSendResponseError { + if m != nil { + return m.Error + } + return nil +} + +type RpcLogSendResponseError struct { + Code RpcLogSendResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcLogSendResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcLogSendResponseError) Reset() { *m = RpcLogSendResponseError{} } +func (m *RpcLogSendResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcLogSendResponseError) ProtoMessage() {} +func (*RpcLogSendResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 4, 0, 1, 0} +} +func (m *RpcLogSendResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcLogSendResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcLogSendResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcLogSendResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcLogSendResponseError.Merge(m, src) +} +func (m *RpcLogSendResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcLogSendResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcLogSendResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcLogSendResponseError proto.InternalMessageInfo + +func (m *RpcLogSendResponseError) GetCode() RpcLogSendResponseErrorCode { + if m != nil { + return m.Code + } + return RpcLogSendResponseError_NULL +} + +func (m *RpcLogSendResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcIpfs struct { +} + +func (m *RpcIpfs) Reset() { *m = RpcIpfs{} } +func (m *RpcIpfs) String() string { return proto.CompactTextString(m) } +func (*RpcIpfs) ProtoMessage() {} +func (*RpcIpfs) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5} +} +func (m *RpcIpfs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcIpfs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcIpfs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcIpfs) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcIpfs.Merge(m, src) +} +func (m *RpcIpfs) XXX_Size() int { + return m.Size() +} +func (m *RpcIpfs) XXX_DiscardUnknown() { + xxx_messageInfo_RpcIpfs.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcIpfs proto.InternalMessageInfo + +type RpcIpfsGet struct { +} + +func (m *RpcIpfsGet) Reset() { *m = RpcIpfsGet{} } +func (m *RpcIpfsGet) String() string { return proto.CompactTextString(m) } +func (*RpcIpfsGet) ProtoMessage() {} +func (*RpcIpfsGet) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5, 0} +} +func (m *RpcIpfsGet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcIpfsGet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcIpfsGet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcIpfsGet) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcIpfsGet.Merge(m, src) +} +func (m *RpcIpfsGet) XXX_Size() int { + return m.Size() +} +func (m *RpcIpfsGet) XXX_DiscardUnknown() { + xxx_messageInfo_RpcIpfsGet.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcIpfsGet proto.InternalMessageInfo + +type RpcIpfsGetFile struct { +} + +func (m *RpcIpfsGetFile) Reset() { *m = RpcIpfsGetFile{} } +func (m *RpcIpfsGetFile) String() string { return proto.CompactTextString(m) } +func (*RpcIpfsGetFile) ProtoMessage() {} +func (*RpcIpfsGetFile) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5, 0, 0} +} +func (m *RpcIpfsGetFile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcIpfsGetFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcIpfsGetFile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcIpfsGetFile) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcIpfsGetFile.Merge(m, src) +} +func (m *RpcIpfsGetFile) XXX_Size() int { + return m.Size() +} +func (m *RpcIpfsGetFile) XXX_DiscardUnknown() { + xxx_messageInfo_RpcIpfsGetFile.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcIpfsGetFile proto.InternalMessageInfo + +type RpcIpfsGetFileRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *RpcIpfsGetFileRequest) Reset() { *m = RpcIpfsGetFileRequest{} } +func (m *RpcIpfsGetFileRequest) String() string { return proto.CompactTextString(m) } +func (*RpcIpfsGetFileRequest) ProtoMessage() {} +func (*RpcIpfsGetFileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5, 0, 0, 0} +} +func (m *RpcIpfsGetFileRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcIpfsGetFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcIpfsGetFileRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcIpfsGetFileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcIpfsGetFileRequest.Merge(m, src) +} +func (m *RpcIpfsGetFileRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcIpfsGetFileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcIpfsGetFileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcIpfsGetFileRequest proto.InternalMessageInfo + +func (m *RpcIpfsGetFileRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type RpcIpfsGetFileResponse struct { + Error *RpcIpfsGetFileResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Media string `protobuf:"bytes,3,opt,name=media,proto3" json:"media,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *RpcIpfsGetFileResponse) Reset() { *m = RpcIpfsGetFileResponse{} } +func (m *RpcIpfsGetFileResponse) String() string { return proto.CompactTextString(m) } +func (*RpcIpfsGetFileResponse) ProtoMessage() {} +func (*RpcIpfsGetFileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5, 0, 0, 1} +} +func (m *RpcIpfsGetFileResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcIpfsGetFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcIpfsGetFileResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcIpfsGetFileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcIpfsGetFileResponse.Merge(m, src) +} +func (m *RpcIpfsGetFileResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcIpfsGetFileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcIpfsGetFileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcIpfsGetFileResponse proto.InternalMessageInfo + +func (m *RpcIpfsGetFileResponse) GetError() *RpcIpfsGetFileResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcIpfsGetFileResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *RpcIpfsGetFileResponse) GetMedia() string { + if m != nil { + return m.Media + } + return "" +} + +func (m *RpcIpfsGetFileResponse) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type RpcIpfsGetFileResponseError struct { + Code RpcIpfsGetFileResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcIpfsGetFileResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcIpfsGetFileResponseError) Reset() { *m = RpcIpfsGetFileResponseError{} } +func (m *RpcIpfsGetFileResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcIpfsGetFileResponseError) ProtoMessage() {} +func (*RpcIpfsGetFileResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 5, 0, 0, 1, 0} +} +func (m *RpcIpfsGetFileResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcIpfsGetFileResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcIpfsGetFileResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcIpfsGetFileResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcIpfsGetFileResponseError.Merge(m, src) +} +func (m *RpcIpfsGetFileResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcIpfsGetFileResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcIpfsGetFileResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcIpfsGetFileResponseError proto.InternalMessageInfo + +func (m *RpcIpfsGetFileResponseError) GetCode() RpcIpfsGetFileResponseErrorCode { + if m != nil { + return m.Code + } + return RpcIpfsGetFileResponseError_NULL +} + +func (m *RpcIpfsGetFileResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcImage struct { +} + +func (m *RpcImage) Reset() { *m = RpcImage{} } +func (m *RpcImage) String() string { return proto.CompactTextString(m) } +func (*RpcImage) ProtoMessage() {} +func (*RpcImage) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6} +} +func (m *RpcImage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImage) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImage.Merge(m, src) +} +func (m *RpcImage) XXX_Size() int { + return m.Size() +} +func (m *RpcImage) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImage.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImage proto.InternalMessageInfo + +type RpcImageGet struct { +} + +func (m *RpcImageGet) Reset() { *m = RpcImageGet{} } +func (m *RpcImageGet) String() string { return proto.CompactTextString(m) } +func (*RpcImageGet) ProtoMessage() {} +func (*RpcImageGet) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0} +} +func (m *RpcImageGet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGet) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGet.Merge(m, src) +} +func (m *RpcImageGet) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGet) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGet.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGet proto.InternalMessageInfo + +type RpcImageGetBlob struct { +} + +func (m *RpcImageGetBlob) Reset() { *m = RpcImageGetBlob{} } +func (m *RpcImageGetBlob) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetBlob) ProtoMessage() {} +func (*RpcImageGetBlob) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 0} +} +func (m *RpcImageGetBlob) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetBlob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetBlob.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetBlob) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetBlob.Merge(m, src) +} +func (m *RpcImageGetBlob) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetBlob) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetBlob.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetBlob proto.InternalMessageInfo + +type RpcImageGetBlobRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Size_ ModelImageSize `protobuf:"varint,2,opt,name=size,proto3,enum=anytype.ModelImageSize" json:"size,omitempty"` +} + +func (m *RpcImageGetBlobRequest) Reset() { *m = RpcImageGetBlobRequest{} } +func (m *RpcImageGetBlobRequest) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetBlobRequest) ProtoMessage() {} +func (*RpcImageGetBlobRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 0, 0} +} +func (m *RpcImageGetBlobRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetBlobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetBlobRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetBlobRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetBlobRequest.Merge(m, src) +} +func (m *RpcImageGetBlobRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetBlobRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetBlobRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetBlobRequest proto.InternalMessageInfo + +func (m *RpcImageGetBlobRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RpcImageGetBlobRequest) GetSize_() ModelImageSize { + if m != nil { + return m.Size_ + } + return ModelImage_LARGE +} + +type RpcImageGetBlobResponse struct { + Error *RpcImageGetBlobResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Blob []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"` +} + +func (m *RpcImageGetBlobResponse) Reset() { *m = RpcImageGetBlobResponse{} } +func (m *RpcImageGetBlobResponse) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetBlobResponse) ProtoMessage() {} +func (*RpcImageGetBlobResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 0, 1} +} +func (m *RpcImageGetBlobResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetBlobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetBlobResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetBlobResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetBlobResponse.Merge(m, src) +} +func (m *RpcImageGetBlobResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetBlobResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetBlobResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetBlobResponse proto.InternalMessageInfo + +func (m *RpcImageGetBlobResponse) GetError() *RpcImageGetBlobResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcImageGetBlobResponse) GetBlob() []byte { + if m != nil { + return m.Blob + } + return nil +} + +type RpcImageGetBlobResponseError struct { + Code RpcImageGetBlobResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcImageGetBlobResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcImageGetBlobResponseError) Reset() { *m = RpcImageGetBlobResponseError{} } +func (m *RpcImageGetBlobResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetBlobResponseError) ProtoMessage() {} +func (*RpcImageGetBlobResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 0, 1, 0} +} +func (m *RpcImageGetBlobResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetBlobResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetBlobResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetBlobResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetBlobResponseError.Merge(m, src) +} +func (m *RpcImageGetBlobResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetBlobResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetBlobResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetBlobResponseError proto.InternalMessageInfo + +func (m *RpcImageGetBlobResponseError) GetCode() RpcImageGetBlobResponseErrorCode { + if m != nil { + return m.Code + } + return RpcImageGetBlobResponseError_NULL +} + +func (m *RpcImageGetBlobResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type RpcImageGetFile struct { +} + +func (m *RpcImageGetFile) Reset() { *m = RpcImageGetFile{} } +func (m *RpcImageGetFile) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetFile) ProtoMessage() {} +func (*RpcImageGetFile) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 1} +} +func (m *RpcImageGetFile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetFile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetFile) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetFile.Merge(m, src) +} +func (m *RpcImageGetFile) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetFile) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetFile.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetFile proto.InternalMessageInfo + +type RpcImageGetFileRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Size_ ModelImageSize `protobuf:"varint,2,opt,name=size,proto3,enum=anytype.ModelImageSize" json:"size,omitempty"` +} + +func (m *RpcImageGetFileRequest) Reset() { *m = RpcImageGetFileRequest{} } +func (m *RpcImageGetFileRequest) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetFileRequest) ProtoMessage() {} +func (*RpcImageGetFileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 1, 0} +} +func (m *RpcImageGetFileRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetFileRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetFileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetFileRequest.Merge(m, src) +} +func (m *RpcImageGetFileRequest) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetFileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetFileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetFileRequest proto.InternalMessageInfo + +func (m *RpcImageGetFileRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RpcImageGetFileRequest) GetSize_() ModelImageSize { + if m != nil { + return m.Size_ + } + return ModelImage_LARGE +} + +type RpcImageGetFileResponse struct { + Error *RpcImageGetFileResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + LocalPath string `protobuf:"bytes,2,opt,name=localPath,proto3" json:"localPath,omitempty"` +} + +func (m *RpcImageGetFileResponse) Reset() { *m = RpcImageGetFileResponse{} } +func (m *RpcImageGetFileResponse) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetFileResponse) ProtoMessage() {} +func (*RpcImageGetFileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 1, 1} +} +func (m *RpcImageGetFileResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetFileResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetFileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetFileResponse.Merge(m, src) +} +func (m *RpcImageGetFileResponse) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetFileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetFileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetFileResponse proto.InternalMessageInfo + +func (m *RpcImageGetFileResponse) GetError() *RpcImageGetFileResponseError { + if m != nil { + return m.Error + } + return nil +} + +func (m *RpcImageGetFileResponse) GetLocalPath() string { + if m != nil { + return m.LocalPath + } + return "" +} + +type RpcImageGetFileResponseError struct { + Code RpcImageGetFileResponseErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.RpcImageGetFileResponseErrorCode" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *RpcImageGetFileResponseError) Reset() { *m = RpcImageGetFileResponseError{} } +func (m *RpcImageGetFileResponseError) String() string { return proto.CompactTextString(m) } +func (*RpcImageGetFileResponseError) ProtoMessage() {} +func (*RpcImageGetFileResponseError) Descriptor() ([]byte, []int) { + return fileDescriptor_0dff099eb2e3dfdb, []int{0, 6, 0, 1, 1, 0} +} +func (m *RpcImageGetFileResponseError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcImageGetFileResponseError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcImageGetFileResponseError.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RpcImageGetFileResponseError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcImageGetFileResponseError.Merge(m, src) +} +func (m *RpcImageGetFileResponseError) XXX_Size() int { + return m.Size() +} +func (m *RpcImageGetFileResponseError) XXX_DiscardUnknown() { + xxx_messageInfo_RpcImageGetFileResponseError.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcImageGetFileResponseError proto.InternalMessageInfo + +func (m *RpcImageGetFileResponseError) GetCode() RpcImageGetFileResponseErrorCode { + if m != nil { + return m.Code + } + return RpcImageGetFileResponseError_NULL +} + +func (m *RpcImageGetFileResponseError) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func init() { + proto.RegisterEnum("anytype.RpcBlockHistoryMoveResponseErrorCode", RpcBlockHistoryMoveResponseErrorCode_name, RpcBlockHistoryMoveResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcBlockOpenResponseErrorCode", RpcBlockOpenResponseErrorCode_name, RpcBlockOpenResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcBlockCreateResponseErrorCode", RpcBlockCreateResponseErrorCode_name, RpcBlockCreateResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcBlockUpdateResponseErrorCode", RpcBlockUpdateResponseErrorCode_name, RpcBlockUpdateResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcWalletCreateResponseErrorCode", RpcWalletCreateResponseErrorCode_name, RpcWalletCreateResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcWalletRecoverResponseErrorCode", RpcWalletRecoverResponseErrorCode_name, RpcWalletRecoverResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcAccountCreateResponseErrorCode", RpcAccountCreateResponseErrorCode_name, RpcAccountCreateResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcAccountRecoverResponseErrorCode", RpcAccountRecoverResponseErrorCode_name, RpcAccountRecoverResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcAccountSelectResponseErrorCode", RpcAccountSelectResponseErrorCode_name, RpcAccountSelectResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcVersionGetResponseErrorCode", RpcVersionGetResponseErrorCode_name, RpcVersionGetResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcLogSendRequestLevel", RpcLogSendRequestLevel_name, RpcLogSendRequestLevel_value) + proto.RegisterEnum("anytype.RpcLogSendResponseErrorCode", RpcLogSendResponseErrorCode_name, RpcLogSendResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcIpfsGetFileResponseErrorCode", RpcIpfsGetFileResponseErrorCode_name, RpcIpfsGetFileResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcImageGetBlobResponseErrorCode", RpcImageGetBlobResponseErrorCode_name, RpcImageGetBlobResponseErrorCode_value) + proto.RegisterEnum("anytype.RpcImageGetFileResponseErrorCode", RpcImageGetFileResponseErrorCode_name, RpcImageGetFileResponseErrorCode_value) + proto.RegisterType((*Rpc)(nil), "anytype.Rpc") + proto.RegisterType((*RpcBlock)(nil), "anytype.Rpc.Block") + proto.RegisterType((*RpcBlockHistory)(nil), "anytype.Rpc.Block.History") + proto.RegisterType((*RpcBlockHistoryMove)(nil), "anytype.Rpc.Block.History.Move") + proto.RegisterType((*RpcBlockHistoryMoveRequest)(nil), "anytype.Rpc.Block.History.Move.Request") + proto.RegisterType((*RpcBlockHistoryMoveResponse)(nil), "anytype.Rpc.Block.History.Move.Response") + proto.RegisterType((*RpcBlockHistoryMoveResponseError)(nil), "anytype.Rpc.Block.History.Move.Response.Error") + proto.RegisterType((*RpcBlockOpen)(nil), "anytype.Rpc.Block.Open") + proto.RegisterType((*RpcBlockOpenRequest)(nil), "anytype.Rpc.Block.Open.Request") + proto.RegisterType((*RpcBlockOpenResponse)(nil), "anytype.Rpc.Block.Open.Response") + proto.RegisterType((*RpcBlockOpenResponseError)(nil), "anytype.Rpc.Block.Open.Response.Error") + proto.RegisterType((*RpcBlockCreate)(nil), "anytype.Rpc.Block.Create") + proto.RegisterType((*RpcBlockCreateRequest)(nil), "anytype.Rpc.Block.Create.Request") + proto.RegisterType((*RpcBlockCreateResponse)(nil), "anytype.Rpc.Block.Create.Response") + proto.RegisterType((*RpcBlockCreateResponseError)(nil), "anytype.Rpc.Block.Create.Response.Error") + proto.RegisterType((*RpcBlockUpdate)(nil), "anytype.Rpc.Block.Update") + proto.RegisterType((*RpcBlockUpdateRequest)(nil), "anytype.Rpc.Block.Update.Request") + proto.RegisterType((*RpcBlockUpdateResponse)(nil), "anytype.Rpc.Block.Update.Response") + proto.RegisterType((*RpcBlockUpdateResponseError)(nil), "anytype.Rpc.Block.Update.Response.Error") + proto.RegisterType((*RpcWallet)(nil), "anytype.Rpc.Wallet") + proto.RegisterType((*RpcWalletCreate)(nil), "anytype.Rpc.Wallet.Create") + proto.RegisterType((*RpcWalletCreateRequest)(nil), "anytype.Rpc.Wallet.Create.Request") + proto.RegisterType((*RpcWalletCreateResponse)(nil), "anytype.Rpc.Wallet.Create.Response") + proto.RegisterType((*RpcWalletCreateResponseError)(nil), "anytype.Rpc.Wallet.Create.Response.Error") + proto.RegisterType((*RpcWalletRecover)(nil), "anytype.Rpc.Wallet.Recover") + proto.RegisterType((*RpcWalletRecoverRequest)(nil), "anytype.Rpc.Wallet.Recover.Request") + proto.RegisterType((*RpcWalletRecoverResponse)(nil), "anytype.Rpc.Wallet.Recover.Response") + proto.RegisterType((*RpcWalletRecoverResponseError)(nil), "anytype.Rpc.Wallet.Recover.Response.Error") + proto.RegisterType((*RpcAccount)(nil), "anytype.Rpc.Account") + proto.RegisterType((*RpcAccountCreate)(nil), "anytype.Rpc.Account.Create") + proto.RegisterType((*RpcAccountCreateRequest)(nil), "anytype.Rpc.Account.Create.Request") + proto.RegisterType((*RpcAccountCreateResponse)(nil), "anytype.Rpc.Account.Create.Response") + proto.RegisterType((*RpcAccountCreateResponseError)(nil), "anytype.Rpc.Account.Create.Response.Error") + proto.RegisterType((*RpcAccountRecover)(nil), "anytype.Rpc.Account.Recover") + proto.RegisterType((*RpcAccountRecoverRequest)(nil), "anytype.Rpc.Account.Recover.Request") + proto.RegisterType((*RpcAccountRecoverResponse)(nil), "anytype.Rpc.Account.Recover.Response") + proto.RegisterType((*RpcAccountRecoverResponseError)(nil), "anytype.Rpc.Account.Recover.Response.Error") + proto.RegisterType((*RpcAccountSelect)(nil), "anytype.Rpc.Account.Select") + proto.RegisterType((*RpcAccountSelectRequest)(nil), "anytype.Rpc.Account.Select.Request") + proto.RegisterType((*RpcAccountSelectResponse)(nil), "anytype.Rpc.Account.Select.Response") + proto.RegisterType((*RpcAccountSelectResponseError)(nil), "anytype.Rpc.Account.Select.Response.Error") + proto.RegisterType((*RpcVersion)(nil), "anytype.Rpc.Version") + proto.RegisterType((*RpcVersionGet)(nil), "anytype.Rpc.Version.Get") + proto.RegisterType((*RpcVersionGetRequest)(nil), "anytype.Rpc.Version.Get.Request") + proto.RegisterType((*RpcVersionGetResponse)(nil), "anytype.Rpc.Version.Get.Response") + proto.RegisterType((*RpcVersionGetResponseError)(nil), "anytype.Rpc.Version.Get.Response.Error") + proto.RegisterType((*RpcLog)(nil), "anytype.Rpc.Log") + proto.RegisterType((*RpcLogSend)(nil), "anytype.Rpc.Log.Send") + proto.RegisterType((*RpcLogSendRequest)(nil), "anytype.Rpc.Log.Send.Request") + proto.RegisterType((*RpcLogSendResponse)(nil), "anytype.Rpc.Log.Send.Response") + proto.RegisterType((*RpcLogSendResponseError)(nil), "anytype.Rpc.Log.Send.Response.Error") + proto.RegisterType((*RpcIpfs)(nil), "anytype.Rpc.Ipfs") + proto.RegisterType((*RpcIpfsGet)(nil), "anytype.Rpc.Ipfs.Get") + proto.RegisterType((*RpcIpfsGetFile)(nil), "anytype.Rpc.Ipfs.Get.File") + proto.RegisterType((*RpcIpfsGetFileRequest)(nil), "anytype.Rpc.Ipfs.Get.File.Request") + proto.RegisterType((*RpcIpfsGetFileResponse)(nil), "anytype.Rpc.Ipfs.Get.File.Response") + proto.RegisterType((*RpcIpfsGetFileResponseError)(nil), "anytype.Rpc.Ipfs.Get.File.Response.Error") + proto.RegisterType((*RpcImage)(nil), "anytype.Rpc.Image") + proto.RegisterType((*RpcImageGet)(nil), "anytype.Rpc.Image.Get") + proto.RegisterType((*RpcImageGetBlob)(nil), "anytype.Rpc.Image.Get.Blob") + proto.RegisterType((*RpcImageGetBlobRequest)(nil), "anytype.Rpc.Image.Get.Blob.Request") + proto.RegisterType((*RpcImageGetBlobResponse)(nil), "anytype.Rpc.Image.Get.Blob.Response") + proto.RegisterType((*RpcImageGetBlobResponseError)(nil), "anytype.Rpc.Image.Get.Blob.Response.Error") + proto.RegisterType((*RpcImageGetFile)(nil), "anytype.Rpc.Image.Get.File") + proto.RegisterType((*RpcImageGetFileRequest)(nil), "anytype.Rpc.Image.Get.File.Request") + proto.RegisterType((*RpcImageGetFileResponse)(nil), "anytype.Rpc.Image.Get.File.Response") + proto.RegisterType((*RpcImageGetFileResponseError)(nil), "anytype.Rpc.Image.Get.File.Response.Error") +} + +func init() { proto.RegisterFile("commands.proto", fileDescriptor_0dff099eb2e3dfdb) } + +var fileDescriptor_0dff099eb2e3dfdb = []byte{ + // 1521 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6c, 0xdb, 0x64, + 0x1b, 0x6f, 0x1c, 0xa7, 0x69, 0x9f, 0x76, 0xfd, 0x3c, 0x6b, 0x9b, 0xba, 0x77, 0x53, 0x57, 0x75, + 0xdf, 0xb7, 0xaf, 0xfb, 0xe7, 0x4d, 0x1d, 0x1c, 0x98, 0x18, 0x9b, 0x93, 0x38, 0xad, 0x21, 0xb1, + 0xab, 0x37, 0x4e, 0x0b, 0x5c, 0x2c, 0x37, 0x7e, 0x9b, 0x06, 0x92, 0x38, 0x38, 0x5e, 0x47, 0x77, + 0xe3, 0x80, 0x38, 0x70, 0x41, 0x48, 0x3b, 0x21, 0x21, 0xb8, 0x21, 0x36, 0x24, 0x0e, 0x48, 0x43, + 0x48, 0x80, 0x04, 0x1c, 0x00, 0x81, 0x34, 0x40, 0x42, 0x5c, 0x40, 0x6c, 0x3b, 0xa2, 0xdd, 0xe0, + 0xb0, 0x03, 0x08, 0xbd, 0xb6, 0x93, 0xd8, 0x55, 0x92, 0xd9, 0xd5, 0xa6, 0xed, 0xe6, 0xf7, 0xcd, + 0xf3, 0xfe, 0x9e, 0xe7, 0xf9, 0xfd, 0x9e, 0xe7, 0xfd, 0x13, 0x98, 0xaa, 0x58, 0x8d, 0x86, 0xd1, + 0x34, 0xdb, 0x42, 0xcb, 0xb6, 0x1c, 0x8b, 0x4f, 0x1b, 0xcd, 0x2d, 0x67, 0xab, 0x45, 0xd0, 0x64, + 0xc3, 0x32, 0x49, 0xdd, 0x9f, 0x46, 0xbb, 0x2a, 0x1b, 0x46, 0xb3, 0x4a, 0xfc, 0xe1, 0xdc, 0x95, + 0x13, 0x90, 0xc4, 0xad, 0x0a, 0xba, 0x0b, 0x90, 0xca, 0xd4, 0xad, 0xca, 0x8b, 0xe8, 0xd5, 0x24, + 0xa4, 0x97, 0x6a, 0x6d, 0xc7, 0xb2, 0xb7, 0xd0, 0x5d, 0x06, 0xd8, 0xa2, 0xb5, 0x49, 0x50, 0x05, + 0xd2, 0x98, 0xbc, 0x74, 0x91, 0xb4, 0x1d, 0x7e, 0x0a, 0x98, 0x9a, 0x39, 0x9d, 0x98, 0x4d, 0xcc, + 0x8f, 0x63, 0xa6, 0x66, 0xf2, 0x47, 0xa8, 0xe7, 0xa6, 0x43, 0x5e, 0x76, 0xdc, 0xf5, 0xb2, 0x39, + 0xcd, 0xb8, 0xbf, 0x6d, 0x9b, 0xe5, 0x67, 0x61, 0xa2, 0x61, 0x6d, 0x92, 0xbc, 0x65, 0x5f, 0x32, + 0x6c, 0x73, 0x3a, 0x39, 0x9b, 0x98, 0x1f, 0xc3, 0xc1, 0x29, 0xf4, 0x3a, 0x03, 0x63, 0x98, 0xb4, + 0x5b, 0x56, 0xb3, 0x4d, 0xf8, 0x1c, 0xa4, 0x88, 0x6d, 0x5b, 0xb6, 0xeb, 0x69, 0x62, 0x41, 0x10, + 0xfc, 0x74, 0x04, 0xdc, 0xaa, 0x08, 0x2e, 0xa6, 0xe0, 0x47, 0x29, 0xd0, 0x08, 0x85, 0xce, 0x42, + 0x41, 0xa2, 0xab, 0xb0, 0xb7, 0x18, 0x7d, 0x9c, 0x80, 0x94, 0x3b, 0xc1, 0x2f, 0x02, 0x5b, 0xb1, + 0x4c, 0xe2, 0xc2, 0x4d, 0x2d, 0x9c, 0x89, 0x07, 0x27, 0x64, 0x2d, 0x93, 0x60, 0x17, 0x80, 0xe6, + 0x61, 0x92, 0x76, 0xc5, 0xae, 0xb5, 0x9c, 0x9a, 0xd5, 0xf4, 0x93, 0x0d, 0x4e, 0xcd, 0xe5, 0x80, + 0xa5, 0xf6, 0xfc, 0x18, 0xb0, 0x4a, 0xb9, 0x50, 0xe0, 0x46, 0xf8, 0xdd, 0xb0, 0xab, 0xac, 0x3c, + 0xa3, 0xa8, 0xab, 0x8a, 0x2e, 0x61, 0xac, 0x62, 0x2e, 0xc1, 0xef, 0x82, 0xf1, 0x8c, 0x98, 0xd3, + 0x65, 0x65, 0xb9, 0xac, 0x71, 0x0c, 0xcf, 0xc1, 0x64, 0x56, 0x54, 0x74, 0x45, 0xd5, 0xf4, 0xa2, + 0xba, 0x22, 0x71, 0x49, 0xf4, 0x1d, 0x03, 0xac, 0xda, 0x22, 0x4d, 0xb4, 0x7f, 0x20, 0xf7, 0xe8, + 0xbd, 0x20, 0x63, 0x4f, 0x86, 0x19, 0x3b, 0xd2, 0x27, 0x45, 0x8a, 0xd7, 0x9f, 0x29, 0xfe, 0x1c, + 0x4c, 0xac, 0x51, 0x9b, 0x25, 0x62, 0x98, 0xc4, 0x76, 0xd3, 0x9a, 0x58, 0x38, 0xd0, 0xc5, 0x28, + 0xd2, 0x1a, 0xea, 0x10, 0xe5, 0x9a, 0xe0, 0xa0, 0x3d, 0x7a, 0xbb, 0x4b, 0xf4, 0xf9, 0x10, 0xd1, + 0xc7, 0xa3, 0x45, 0x11, 0x8f, 0xe0, 0x85, 0xf8, 0x04, 0xa3, 0x9b, 0x0c, 0x8c, 0x66, 0x6d, 0x62, + 0x38, 0x04, 0x55, 0x7b, 0x84, 0x3e, 0x06, 0x2c, 0x0d, 0xce, 0x0f, 0x76, 0x76, 0x48, 0xba, 0x82, + 0xb6, 0xd5, 0x22, 0xd8, 0xb5, 0x8e, 0x5a, 0xf2, 0xe8, 0x4e, 0x22, 0x20, 0xcf, 0x53, 0x61, 0x79, + 0xe6, 0xfb, 0x10, 0xe3, 0xc5, 0x37, 0xa0, 0x94, 0xdf, 0xe9, 0x32, 0x2c, 0x86, 0x18, 0x3e, 0x19, + 0x15, 0xe8, 0xc1, 0x73, 0xfc, 0x11, 0x03, 0xa3, 0xe5, 0x96, 0x49, 0x39, 0x3e, 0xdb, 0xe3, 0xf8, + 0x14, 0xa4, 0xfd, 0x3d, 0xc7, 0x4f, 0x7d, 0x6f, 0x37, 0x62, 0x37, 0xda, 0xac, 0xf7, 0x23, 0xee, + 0x58, 0xc5, 0xa6, 0xcd, 0x73, 0x79, 0x1f, 0x68, 0xeb, 0x0b, 0xf4, 0xe0, 0x69, 0xfb, 0x3e, 0x05, + 0xa3, 0xab, 0x46, 0xbd, 0x4e, 0x1c, 0xf4, 0x5b, 0xaf, 0x4a, 0xff, 0xd7, 0x63, 0x10, 0xc1, 0x98, + 0x6d, 0x59, 0xce, 0xb2, 0xe1, 0x6c, 0xf8, 0xcd, 0xdf, 0x1d, 0xa3, 0x6b, 0xc1, 0x2d, 0xe0, 0x7c, + 0x98, 0xac, 0xa3, 0xa1, 0x1c, 0x3d, 0x17, 0x43, 0x8b, 0x8c, 0x7a, 0x6a, 0x34, 0x49, 0xc3, 0x6a, + 0xd6, 0x2a, 0x7e, 0x76, 0xdd, 0x31, 0xfa, 0xa2, 0xcb, 0x64, 0x26, 0xc4, 0xa4, 0x10, 0xd9, 0x4b, + 0x3c, 0x2a, 0x4b, 0x3b, 0xd8, 0x46, 0x0f, 0xc1, 0x81, 0xbc, 0x28, 0x17, 0xa4, 0x9c, 0xae, 0xa9, + 0x7a, 0x16, 0x4b, 0xa2, 0x26, 0xe9, 0x05, 0x35, 0x2b, 0x16, 0x74, 0x2c, 0x2d, 0xab, 0x1c, 0xa1, + 0xdb, 0x40, 0x1a, 0x93, 0x8a, 0xb5, 0x49, 0x6c, 0x24, 0x46, 0x62, 0x78, 0x28, 0x27, 0x6f, 0x06, + 0xd9, 0xbf, 0x10, 0x66, 0xff, 0x58, 0x3f, 0x5e, 0x7c, 0xdf, 0x03, 0x8a, 0xf5, 0xcb, 0x2e, 0xc5, + 0xd9, 0x10, 0xc5, 0xa7, 0xa2, 0x43, 0x3d, 0x02, 0x1c, 0xbf, 0x35, 0x09, 0x69, 0xb1, 0x52, 0xb1, + 0x2e, 0x36, 0x1d, 0xf4, 0x21, 0xdb, 0x2d, 0xe8, 0x4b, 0x3d, 0xba, 0x79, 0x60, 0x9b, 0x46, 0x83, + 0xf8, 0x54, 0xbb, 0xdf, 0xfc, 0x31, 0xf8, 0x8f, 0xb1, 0x69, 0x38, 0x86, 0x5d, 0xb0, 0x2a, 0x46, + 0xdd, 0x55, 0xc2, 0x0d, 0x78, 0x69, 0x04, 0x6f, 0xff, 0x81, 0x9f, 0x83, 0x09, 0x6f, 0x2a, 0x6b, + 0xd5, 0x2d, 0xdb, 0xbd, 0x4b, 0x50, 0xbb, 0xe0, 0x64, 0x66, 0x0c, 0x46, 0xbd, 0x21, 0xba, 0x96, + 0x8c, 0x2a, 0x92, 0x1f, 0xf5, 0xf0, 0x1e, 0x39, 0x0d, 0x69, 0xc3, 0xb3, 0xf3, 0x4f, 0xc9, 0x7d, + 0xdb, 0x8e, 0x0d, 0x1f, 0x05, 0x77, 0xcc, 0xd0, 0x55, 0x26, 0x8a, 0xac, 0x43, 0x9d, 0xc7, 0x93, + 0xf5, 0x93, 0xc4, 0x0e, 0x74, 0x3d, 0x01, 0xf3, 0x62, 0x36, 0xab, 0x96, 0x15, 0xcd, 0x57, 0x35, + 0xa7, 0x67, 0xca, 0x9a, 0xde, 0xd3, 0xba, 0xa4, 0x89, 0x58, 0xd3, 0x15, 0x35, 0x27, 0x71, 0x54, + 0xae, 0x23, 0xf7, 0xb0, 0x96, 0x34, 0x5d, 0x11, 0x8b, 0x12, 0xb7, 0x1e, 0x01, 0x59, 0xd2, 0x74, + 0x71, 0x45, 0xd4, 0x44, 0xcc, 0x55, 0xd1, 0x57, 0xc9, 0x5e, 0x8b, 0x8e, 0x77, 0x6b, 0x06, 0x7d, + 0x10, 0x54, 0x51, 0x0c, 0xab, 0x78, 0xbc, 0x2f, 0x91, 0xc3, 0x7b, 0xed, 0xd7, 0xae, 0x28, 0xb9, + 0x90, 0x28, 0xa7, 0x63, 0x60, 0xc5, 0x53, 0xe5, 0x8f, 0x9d, 0xa8, 0xb2, 0x17, 0x76, 0x2b, 0xaa, + 0xee, 0xd3, 0x57, 0xd2, 0xf3, 0x6a, 0x59, 0xc9, 0x71, 0xd4, 0xdb, 0x41, 0x45, 0xf2, 0xc8, 0xc3, + 0x52, 0x56, 0x5d, 0x91, 0xb0, 0xbe, 0x2a, 0x16, 0x0a, 0x92, 0xa6, 0xe7, 0x65, 0x5c, 0xd2, 0xb8, + 0xf5, 0x7b, 0xb5, 0x69, 0x95, 0x3f, 0x0c, 0x87, 0x7a, 0x63, 0x5d, 0x7a, 0x56, 0x2e, 0x69, 0x25, + 0x57, 0x97, 0xac, 0x8a, 0x71, 0x79, 0x59, 0x93, 0x72, 0xdc, 0x06, 0xbf, 0x0f, 0xf8, 0x1e, 0x0a, + 0x2e, 0x2b, 0x9e, 0xfc, 0x35, 0xea, 0xdf, 0xf7, 0xd7, 0x71, 0x4f, 0xaf, 0xae, 0xcb, 0x12, 0xce, + 0xab, 0xb8, 0x28, 0xe5, 0xb8, 0x17, 0xd0, 0x15, 0x16, 0x46, 0x4b, 0xa4, 0x4e, 0x2a, 0x0e, 0x7a, + 0x7c, 0xf0, 0xeb, 0x21, 0xb8, 0xf1, 0x32, 0xdb, 0x8e, 0xb6, 0x9f, 0x62, 0xf7, 0xad, 0xe7, 0xef, + 0xbe, 0xf5, 0xed, 0x8f, 0xb1, 0xfa, 0xb6, 0xaf, 0xf3, 0x78, 0x15, 0x72, 0x33, 0xf1, 0x00, 0xf6, + 0xe3, 0x28, 0x42, 0xaf, 0x0f, 0x10, 0xba, 0x1a, 0x46, 0xcf, 0xcb, 0x4a, 0xae, 0x53, 0x8b, 0xba, + 0xac, 0xe4, 0x55, 0x6e, 0x83, 0x17, 0xe0, 0x58, 0x00, 0x9d, 0x56, 0x81, 0xef, 0x41, 0x54, 0x72, + 0x7a, 0x51, 0x91, 0x8a, 0xaa, 0x22, 0x67, 0xdd, 0xf9, 0x92, 0xa4, 0x71, 0x35, 0xf4, 0x33, 0x03, + 0xe9, 0x15, 0x62, 0xb7, 0x6b, 0x56, 0x13, 0x7d, 0xcb, 0x40, 0x72, 0x91, 0x38, 0xc1, 0x36, 0xbf, + 0x1e, 0x3c, 0x51, 0xcf, 0x85, 0x45, 0xff, 0x7f, 0x88, 0x77, 0x1f, 0x44, 0x58, 0x24, 0x83, 0x14, + 0x9f, 0x86, 0xf4, 0xa6, 0x67, 0xe4, 0x93, 0xdd, 0x19, 0xa2, 0x1f, 0xba, 0x07, 0xed, 0x85, 0x90, + 0xb2, 0x27, 0x22, 0x7a, 0x88, 0x27, 0xab, 0xb9, 0x03, 0x55, 0xf7, 0x00, 0xb7, 0x22, 0xe1, 0x92, + 0xac, 0x2a, 0xba, 0x5c, 0xd2, 0xa5, 0xe2, 0xb2, 0xf6, 0x1c, 0x97, 0xa4, 0x46, 0x94, 0xc9, 0xce, + 0x2e, 0x30, 0x01, 0x69, 0x4d, 0x2e, 0x4a, 0x6a, 0x59, 0xe3, 0xd6, 0xd1, 0xe7, 0x49, 0x48, 0x16, + 0xac, 0x2a, 0xba, 0x9e, 0x04, 0xb6, 0x44, 0x9a, 0x26, 0x7a, 0x3f, 0xd1, 0xeb, 0xbb, 0x69, 0x48, + 0x37, 0x48, 0xbb, 0x6d, 0x54, 0x3b, 0x87, 0x6e, 0x67, 0xc8, 0x3f, 0x01, 0xa9, 0x3a, 0xd9, 0x24, + 0x75, 0x37, 0xf0, 0xa9, 0x85, 0xc3, 0x21, 0x06, 0x0a, 0x56, 0x55, 0xa0, 0x58, 0x82, 0x8f, 0x23, + 0x14, 0xa8, 0x29, 0xf6, 0x56, 0xcc, 0x3d, 0x0d, 0x29, 0x77, 0xcc, 0x8f, 0x43, 0x2a, 0x27, 0x65, + 0xca, 0x8b, 0xdc, 0x08, 0xfd, 0xec, 0x64, 0x34, 0x0e, 0xa9, 0xbc, 0xa8, 0x89, 0x05, 0x8e, 0xa1, + 0x99, 0xbb, 0xe5, 0x92, 0xa4, 0x93, 0xcb, 0xa2, 0x22, 0x67, 0x39, 0x96, 0x46, 0xbf, 0x2a, 0x62, + 0x45, 0x56, 0x16, 0xb9, 0x14, 0x7a, 0x25, 0xa8, 0xfb, 0xd9, 0xb0, 0xee, 0xff, 0x1d, 0x14, 0xd3, + 0xf0, 0x27, 0xff, 0xb9, 0x90, 0xb4, 0x47, 0xa3, 0x80, 0xc4, 0xd3, 0x55, 0xd9, 0x81, 0xae, 0xc3, + 0x14, 0xfc, 0x87, 0x01, 0x56, 0x6e, 0xad, 0xb7, 0xd1, 0x5f, 0x7e, 0x5f, 0xdc, 0x61, 0x80, 0xcd, + 0xd7, 0xea, 0x64, 0xd8, 0x7f, 0x00, 0xdf, 0x44, 0x7e, 0x00, 0x50, 0x68, 0xb7, 0x96, 0x29, 0xe4, + 0x80, 0x96, 0xe1, 0x81, 0x35, 0x0d, 0xc7, 0x70, 0xb3, 0x9d, 0xc4, 0xee, 0x37, 0xbf, 0x07, 0x52, + 0x0d, 0x62, 0xd6, 0x0c, 0xef, 0x9e, 0x85, 0xbd, 0x41, 0xf7, 0x0e, 0xc7, 0xf6, 0xee, 0x70, 0xe8, + 0xd3, 0x48, 0x4f, 0x84, 0x61, 0x71, 0x3c, 0x5c, 0x01, 0x5e, 0x1b, 0x85, 0x94, 0xdc, 0x30, 0xaa, + 0x04, 0xfd, 0x9d, 0xf2, 0x14, 0xf8, 0x93, 0x01, 0x36, 0x53, 0xb7, 0xd6, 0xd0, 0xd2, 0xe0, 0x33, + 0xec, 0x24, 0xb0, 0xed, 0xda, 0x65, 0xe2, 0x37, 0xd0, 0xfe, 0x6d, 0xa7, 0x8a, 0x8b, 0x27, 0x94, + 0x6a, 0x97, 0x09, 0x76, 0xcd, 0xd0, 0xbb, 0x91, 0xdf, 0x0c, 0xde, 0x52, 0xca, 0x14, 0x0d, 0x61, + 0xb0, 0x62, 0x6b, 0x75, 0x6b, 0xad, 0xa3, 0x18, 0xfd, 0x46, 0x9f, 0x45, 0x7a, 0x47, 0x0c, 0x85, + 0x7f, 0xf8, 0x9d, 0xe0, 0x16, 0xfe, 0xfd, 0xa3, 0xfd, 0xea, 0x0e, 0x68, 0x1f, 0xd2, 0x28, 0x07, + 0x61, 0xbc, 0x1e, 0x7e, 0xa8, 0xe0, 0xde, 0x44, 0x6c, 0x01, 0x1e, 0xb5, 0x4e, 0xc8, 0x1c, 0xfc, + 0xfa, 0xd6, 0x4c, 0xe2, 0xc6, 0xad, 0x99, 0xc4, 0xef, 0xb7, 0x66, 0x12, 0x6f, 0xdc, 0x9e, 0x19, + 0xb9, 0x71, 0x7b, 0x66, 0xe4, 0x97, 0xdb, 0x33, 0x23, 0xcf, 0x33, 0xad, 0xb5, 0xb5, 0x51, 0xf7, + 0xcf, 0xe3, 0x33, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x83, 0x77, 0x03, 0x72, 0x74, 0x16, 0x00, + 0x00, +} + +func (m *Rpc) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Rpc) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Rpc) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlockHistory) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockHistory) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlockHistoryMove) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockHistoryMove) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockHistoryMove) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlockHistoryMoveRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockHistoryMoveRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockHistoryMoveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MoveForward { + i-- + if m.MoveForward { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.ContextBlockId) > 0 { + i -= len(m.ContextBlockId) + copy(dAtA[i:], m.ContextBlockId) + i = encodeVarintCommands(dAtA, i, uint64(len(m.ContextBlockId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockHistoryMoveResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockHistoryMoveResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockHistoryMoveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockHistoryMoveResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockHistoryMoveResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockHistoryMoveResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockOpen) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockOpen) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlockOpenRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockOpenRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockOpenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockOpenResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockOpenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockOpenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeader != nil { + { + size, err := m.BlockHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockOpenResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockOpenResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockOpenResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockCreate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockCreate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlockCreateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockCreateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContextBlockId) > 0 { + i -= len(m.ContextBlockId) + copy(dAtA[i:], m.ContextBlockId) + i = encodeVarintCommands(dAtA, i, uint64(len(m.ContextBlockId))) + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockCreateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockCreateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockCreateResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockCreateResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockCreateResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcBlockUpdateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockUpdateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Changes != nil { + { + size, err := m.Changes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockUpdateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockUpdateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcBlockUpdateResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcBlockUpdateResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcBlockUpdateResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcWallet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWallet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWallet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcWalletCreate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletCreate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcWalletCreateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletCreateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RootPath) > 0 { + i -= len(m.RootPath) + copy(dAtA[i:], m.RootPath) + i = encodeVarintCommands(dAtA, i, uint64(len(m.RootPath))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcWalletCreateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletCreateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Mnemonic) > 0 { + i -= len(m.Mnemonic) + copy(dAtA[i:], m.Mnemonic) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Mnemonic))) + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcWalletCreateResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletCreateResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletCreateResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcWalletRecover) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletRecover) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletRecover) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcWalletRecoverRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletRecoverRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletRecoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Mnemonic) > 0 { + i -= len(m.Mnemonic) + copy(dAtA[i:], m.Mnemonic) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Mnemonic))) + i-- + dAtA[i] = 0x12 + } + if len(m.RootPath) > 0 { + i -= len(m.RootPath) + copy(dAtA[i:], m.RootPath) + i = encodeVarintCommands(dAtA, i, uint64(len(m.RootPath))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcWalletRecoverResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletRecoverResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletRecoverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcWalletRecoverResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcWalletRecoverResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcWalletRecoverResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcAccountCreate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountCreate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcAccountCreateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountCreateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Avatar != nil { + { + size := m.Avatar.Size() + i -= size + if _, err := m.Avatar.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountCreateRequestAvatarOfAvatarLocalPath) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountCreateRequestAvatarOfAvatarLocalPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AvatarLocalPath) + copy(dAtA[i:], m.AvatarLocalPath) + i = encodeVarintCommands(dAtA, i, uint64(len(m.AvatarLocalPath))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil +} +func (m *RpcAccountCreateRequestAvatarOfAvatarColor) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountCreateRequestAvatarOfAvatarColor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AvatarColor) + copy(dAtA[i:], m.AvatarColor) + i = encodeVarintCommands(dAtA, i, uint64(len(m.AvatarColor))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *RpcAccountCreateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountCreateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountCreateResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountCreateResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountCreateResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountRecover) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountRecover) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountRecover) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcAccountRecoverRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountRecoverRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountRecoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcAccountRecoverResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountRecoverResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountRecoverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountRecoverResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountRecoverResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountRecoverResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountSelect) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountSelect) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountSelect) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcAccountSelectRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountSelectRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountSelectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RootPath) > 0 { + i -= len(m.RootPath) + copy(dAtA[i:], m.RootPath) + i = encodeVarintCommands(dAtA, i, uint64(len(m.RootPath))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountSelectResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountSelectResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountSelectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcAccountSelectResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcAccountSelectResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcAccountSelectResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcVersion) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcVersion) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcVersionGet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcVersionGet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcVersionGet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcVersionGetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcVersionGetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcVersionGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcVersionGetResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcVersionGetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcVersionGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcVersionGetResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcVersionGetResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcVersionGetResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcLog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcLog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcLogSend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcLogSend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcLogSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcLogSendRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcLogSendRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcLogSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Level != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Level)) + i-- + dAtA[i] = 0x10 + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcLogSendResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcLogSendResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcLogSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcLogSendResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcLogSendResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcLogSendResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcIpfs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcIpfs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcIpfs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcIpfsGet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcIpfsGet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcIpfsGet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcIpfsGetFile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcIpfsGetFile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcIpfsGetFile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcIpfsGetFileRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcIpfsGetFileRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcIpfsGetFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcIpfsGetFileResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcIpfsGetFileResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcIpfsGetFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + } + if len(m.Media) > 0 { + i -= len(m.Media) + copy(dAtA[i:], m.Media) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Media))) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcIpfsGetFileResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcIpfsGetFileResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcIpfsGetFileResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcImage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcImageGet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcImageGetBlob) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetBlob) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetBlob) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcImageGetBlobRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetBlobRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetBlobRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Size_ != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcImageGetBlobResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetBlobResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetBlobResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Blob) > 0 { + i -= len(m.Blob) + copy(dAtA[i:], m.Blob) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Blob))) + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcImageGetBlobResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetBlobResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetBlobResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RpcImageGetFile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetFile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetFile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RpcImageGetFileRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetFileRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Size_ != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcImageGetFileResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetFileResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LocalPath) > 0 { + i -= len(m.LocalPath) + copy(dAtA[i:], m.LocalPath) + i = encodeVarintCommands(dAtA, i, uint64(len(m.LocalPath))) + i-- + dAtA[i] = 0x12 + } + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommands(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcImageGetFileResponseError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RpcImageGetFileResponseError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcImageGetFileResponseError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintCommands(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintCommands(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintCommands(dAtA []byte, offset int, v uint64) int { + offset -= sovCommands(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Rpc) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlockHistory) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlockHistoryMove) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlockHistoryMoveRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.ContextBlockId) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + if m.MoveForward { + n += 2 + } + return n +} + +func (m *RpcBlockHistoryMoveResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockHistoryMoveResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockOpen) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlockOpenRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockOpenResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + if m.BlockHeader != nil { + l = m.BlockHeader.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockOpenResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockCreate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlockCreateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovCommands(uint64(m.Type)) + } + l = len(m.ContextBlockId) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockCreateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockCreateResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcBlockUpdateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Changes != nil { + l = m.Changes.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockUpdateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcBlockUpdateResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcWallet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcWalletCreate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcWalletCreateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RootPath) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcWalletCreateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Mnemonic) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcWalletCreateResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcWalletRecover) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcWalletRecoverRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RootPath) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Mnemonic) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcWalletRecoverResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcWalletRecoverResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcAccountCreate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcAccountCreateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + if m.Avatar != nil { + n += m.Avatar.Size() + } + return n +} + +func (m *RpcAccountCreateRequestAvatarOfAvatarLocalPath) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AvatarLocalPath) + n += 1 + l + sovCommands(uint64(l)) + return n +} +func (m *RpcAccountCreateRequestAvatarOfAvatarColor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AvatarColor) + n += 1 + l + sovCommands(uint64(l)) + return n +} +func (m *RpcAccountCreateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccountCreateResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccountRecover) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcAccountRecoverRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcAccountRecoverResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccountRecoverResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccountSelect) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcAccountSelectRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.RootPath) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccountSelectResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcAccountSelectResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcVersion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcVersionGet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcVersionGetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcVersionGetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcVersionGetResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcLog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcLogSend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcLogSendRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + if m.Level != 0 { + n += 1 + sovCommands(uint64(m.Level)) + } + return n +} + +func (m *RpcLogSendResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcLogSendResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcIpfs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcIpfsGet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcIpfsGetFile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcIpfsGetFileRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcIpfsGetFileResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Media) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcIpfsGetFileResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcImage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcImageGet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcImageGetBlob) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcImageGetBlobRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + if m.Size_ != 0 { + n += 1 + sovCommands(uint64(m.Size_)) + } + return n +} + +func (m *RpcImageGetBlobResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.Blob) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcImageGetBlobResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcImageGetFile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RpcImageGetFileRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + if m.Size_ != 0 { + n += 1 + sovCommands(uint64(m.Size_)) + } + return n +} + +func (m *RpcImageGetFileResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovCommands(uint64(l)) + } + l = len(m.LocalPath) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func (m *RpcImageGetFileResponseError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovCommands(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } + return n +} + +func sovCommands(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCommands(x uint64) (n int) { + return sovCommands(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Rpc) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Rpc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Rpc: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockHistory) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: History: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: History: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockHistoryMove) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Move: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Move: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockHistoryMoveRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContextBlockId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContextBlockId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MoveForward", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MoveForward = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockHistoryMoveResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcBlockHistoryMoveResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockHistoryMoveResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcBlockHistoryMoveResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockOpen) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Open: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Open: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockOpenRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockOpenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcBlockOpenResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BlockHeader == nil { + m.BlockHeader = &ModelBlockHeader{} + } + if err := m.BlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockOpenResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcBlockOpenResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockCreate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Create: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Create: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockCreateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= ModelBlockHeaderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContextBlockId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContextBlockId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockCreateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcBlockCreateResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockCreateResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcBlockCreateResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Update: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Update: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockUpdateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Changes == nil { + m.Changes = &BlockChanges{} + } + if err := m.Changes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockUpdateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcBlockUpdateResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcBlockUpdateResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcBlockUpdateResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWallet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Wallet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wallet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletCreate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Create: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Create: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletCreateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletCreateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcWalletCreateResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mnemonic", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mnemonic = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletCreateResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcWalletCreateResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletRecover) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Recover: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Recover: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletRecoverRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mnemonic", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mnemonic = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletRecoverResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcWalletRecoverResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcWalletRecoverResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcWalletRecoverResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Account: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountCreate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Create: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Create: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountCreateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AvatarLocalPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Avatar = &RpcAccountCreateRequestAvatarOfAvatarLocalPath{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AvatarColor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Avatar = &RpcAccountCreateRequestAvatarOfAvatarColor{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountCreateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcAccountCreateResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &ModelAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountCreateResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcAccountCreateResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountRecover) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Recover: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Recover: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountRecoverRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountRecoverResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcAccountRecoverResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountRecoverResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcAccountRecoverResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountSelect) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Select: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Select: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountSelectRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountSelectResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcAccountSelectResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &ModelAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcAccountSelectResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcAccountSelectResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcVersion) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Version: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcVersionGet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Get: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcVersionGetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcVersionGetResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcVersionGetResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcVersionGetResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcVersionGetResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcLog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Log: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcLogSend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Send: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Send: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcLogSendRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= RpcLogSendRequestLevel(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcLogSendResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcLogSendResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcLogSendResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcLogSendResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcIpfs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ipfs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ipfs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcIpfsGet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Get: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcIpfsGetFile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: File: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcIpfsGetFileRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcIpfsGetFileResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcIpfsGetFileResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Media", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Media = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcIpfsGetFileResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcIpfsGetFileResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Get: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetBlob) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Blob: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Blob: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetBlobRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + m.Size_ = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size_ |= ModelImageSize(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetBlobResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcImageGetBlobResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Blob = append(m.Blob[:0], dAtA[iNdEx:postIndex]...) + if m.Blob == nil { + m.Blob = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetBlobResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcImageGetBlobResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetFile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: File: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: File: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetFileRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + m.Size_ = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size_ |= ModelImageSize(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetFileResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RpcImageGetFileResponseError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LocalPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcImageGetFileResponseError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= RpcImageGetFileResponseErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommands(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCommands + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCommands(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommands + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommands + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommands + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCommands + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommands + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommands + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCommands = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommands = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommands = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pb/edit.pb.go b/pb/edit.pb.go deleted file mode 100644 index 169589d8c..000000000 --- a/pb/edit.pb.go +++ /dev/null @@ -1,1277 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: edit.proto - -package pb - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type UserBlockTextRange struct { - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - BlockId string `protobuf:"bytes,2,opt,name=blockId,proto3" json:"blockId,omitempty"` - Range *Range `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` -} - -func (m *UserBlockTextRange) Reset() { *m = UserBlockTextRange{} } -func (m *UserBlockTextRange) String() string { return proto.CompactTextString(m) } -func (*UserBlockTextRange) ProtoMessage() {} -func (*UserBlockTextRange) Descriptor() ([]byte, []int) { - return fileDescriptor_f5013c7d48f38d97, []int{0} -} -func (m *UserBlockTextRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserBlockTextRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserBlockTextRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserBlockTextRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserBlockTextRange.Merge(m, src) -} -func (m *UserBlockTextRange) XXX_Size() int { - return m.Size() -} -func (m *UserBlockTextRange) XXX_DiscardUnknown() { - xxx_messageInfo_UserBlockTextRange.DiscardUnknown(m) -} - -var xxx_messageInfo_UserBlockTextRange proto.InternalMessageInfo - -func (m *UserBlockTextRange) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -func (m *UserBlockTextRange) GetBlockId() string { - if m != nil { - return m.BlockId - } - return "" -} - -func (m *UserBlockTextRange) GetRange() *Range { - if m != nil { - return m.Range - } - return nil -} - -type UserBlockJoin struct { - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *UserBlockJoin) Reset() { *m = UserBlockJoin{} } -func (m *UserBlockJoin) String() string { return proto.CompactTextString(m) } -func (*UserBlockJoin) ProtoMessage() {} -func (*UserBlockJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_f5013c7d48f38d97, []int{1} -} -func (m *UserBlockJoin) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserBlockJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserBlockJoin.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserBlockJoin) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserBlockJoin.Merge(m, src) -} -func (m *UserBlockJoin) XXX_Size() int { - return m.Size() -} -func (m *UserBlockJoin) XXX_DiscardUnknown() { - xxx_messageInfo_UserBlockJoin.DiscardUnknown(m) -} - -var xxx_messageInfo_UserBlockJoin proto.InternalMessageInfo - -func (m *UserBlockJoin) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -type UserBlockLeft struct { - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *UserBlockLeft) Reset() { *m = UserBlockLeft{} } -func (m *UserBlockLeft) String() string { return proto.CompactTextString(m) } -func (*UserBlockLeft) ProtoMessage() {} -func (*UserBlockLeft) Descriptor() ([]byte, []int) { - return fileDescriptor_f5013c7d48f38d97, []int{2} -} -func (m *UserBlockLeft) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserBlockLeft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserBlockLeft.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserBlockLeft) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserBlockLeft.Merge(m, src) -} -func (m *UserBlockLeft) XXX_Size() int { - return m.Size() -} -func (m *UserBlockLeft) XXX_DiscardUnknown() { - xxx_messageInfo_UserBlockLeft.DiscardUnknown(m) -} - -var xxx_messageInfo_UserBlockLeft proto.InternalMessageInfo - -func (m *UserBlockLeft) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -type UserBlockSelectRange struct { - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - BlockIdsArray []string `protobuf:"bytes,2,rep,name=blockIdsArray,proto3" json:"blockIdsArray,omitempty"` -} - -func (m *UserBlockSelectRange) Reset() { *m = UserBlockSelectRange{} } -func (m *UserBlockSelectRange) String() string { return proto.CompactTextString(m) } -func (*UserBlockSelectRange) ProtoMessage() {} -func (*UserBlockSelectRange) Descriptor() ([]byte, []int) { - return fileDescriptor_f5013c7d48f38d97, []int{3} -} -func (m *UserBlockSelectRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserBlockSelectRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserBlockSelectRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserBlockSelectRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserBlockSelectRange.Merge(m, src) -} -func (m *UserBlockSelectRange) XXX_Size() int { - return m.Size() -} -func (m *UserBlockSelectRange) XXX_DiscardUnknown() { - xxx_messageInfo_UserBlockSelectRange.DiscardUnknown(m) -} - -var xxx_messageInfo_UserBlockSelectRange proto.InternalMessageInfo - -func (m *UserBlockSelectRange) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -func (m *UserBlockSelectRange) GetBlockIdsArray() []string { - if m != nil { - return m.BlockIdsArray - } - return nil -} - -type UserBlockFocus struct { - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - BlockId string `protobuf:"bytes,2,opt,name=blockId,proto3" json:"blockId,omitempty"` -} - -func (m *UserBlockFocus) Reset() { *m = UserBlockFocus{} } -func (m *UserBlockFocus) String() string { return proto.CompactTextString(m) } -func (*UserBlockFocus) ProtoMessage() {} -func (*UserBlockFocus) Descriptor() ([]byte, []int) { - return fileDescriptor_f5013c7d48f38d97, []int{4} -} -func (m *UserBlockFocus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserBlockFocus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserBlockFocus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserBlockFocus) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserBlockFocus.Merge(m, src) -} -func (m *UserBlockFocus) XXX_Size() int { - return m.Size() -} -func (m *UserBlockFocus) XXX_DiscardUnknown() { - xxx_messageInfo_UserBlockFocus.DiscardUnknown(m) -} - -var xxx_messageInfo_UserBlockFocus proto.InternalMessageInfo - -func (m *UserBlockFocus) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -func (m *UserBlockFocus) GetBlockId() string { - if m != nil { - return m.BlockId - } - return "" -} - -func init() { - proto.RegisterType((*UserBlockTextRange)(nil), "anytype.UserBlockTextRange") - proto.RegisterType((*UserBlockJoin)(nil), "anytype.UserBlockJoin") - proto.RegisterType((*UserBlockLeft)(nil), "anytype.UserBlockLeft") - proto.RegisterType((*UserBlockSelectRange)(nil), "anytype.UserBlockSelectRange") - proto.RegisterType((*UserBlockFocus)(nil), "anytype.UserBlockFocus") -} - -func init() { proto.RegisterFile("edit.proto", fileDescriptor_f5013c7d48f38d97) } - -var fileDescriptor_f5013c7d48f38d97 = []byte{ - // 250 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x4d, 0xc9, 0x2c, - 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4f, 0xcc, 0xab, 0x2c, 0xa9, 0x2c, 0x48, 0x95, - 0xe2, 0x4e, 0xca, 0xc9, 0x4f, 0xce, 0x86, 0x88, 0x4a, 0xf1, 0x26, 0x26, 0x27, 0xe7, 0x97, 0xe6, - 0x41, 0x15, 0x29, 0x35, 0x30, 0x72, 0x09, 0x85, 0x16, 0xa7, 0x16, 0x39, 0x81, 0x94, 0x84, 0xa4, - 0x56, 0x94, 0x04, 0x25, 0xe6, 0xa5, 0xa7, 0x0a, 0x69, 0x71, 0xb1, 0x43, 0xd5, 0x49, 0x30, 0x2a, - 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xe8, 0x41, 0x4d, 0xd3, 0x73, 0x84, 0x88, 0x07, 0xc1, 0x14, 0x08, - 0x49, 0x70, 0xb1, 0x83, 0x2d, 0xf0, 0x4c, 0x91, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, - 0x85, 0x54, 0xb8, 0x58, 0x8b, 0x40, 0xc6, 0x49, 0x30, 0x83, 0xcd, 0xe0, 0x83, 0x9b, 0x01, 0xb6, - 0x24, 0x08, 0x22, 0xa9, 0x64, 0xcd, 0xc5, 0x0b, 0x77, 0x81, 0x57, 0x7e, 0x66, 0x1e, 0x29, 0x96, - 0xa3, 0x68, 0xf6, 0x49, 0x4d, 0x2b, 0x21, 0x49, 0x73, 0x06, 0x97, 0x08, 0x5c, 0x73, 0x70, 0x6a, - 0x4e, 0x6a, 0x32, 0x19, 0xbe, 0x57, 0xe1, 0xe2, 0x85, 0x7a, 0xb7, 0xd8, 0xb1, 0xa8, 0x28, 0xb1, - 0x52, 0x82, 0x49, 0x81, 0x59, 0x83, 0x33, 0x08, 0x55, 0x50, 0x29, 0x8c, 0x8b, 0x0f, 0x6e, 0x93, - 0x5b, 0x7e, 0x72, 0x69, 0x31, 0x75, 0x42, 0xd8, 0x49, 0xe6, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, - 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, - 0x8f, 0xe5, 0x18, 0xa2, 0x98, 0x0a, 0x92, 0x92, 0xd8, 0xc0, 0x71, 0x6c, 0x0c, 0x08, 0x00, 0x00, - 0xff, 0xff, 0x2e, 0xa0, 0x3b, 0x82, 0x16, 0x02, 0x00, 0x00, -} - -func (m *UserBlockTextRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserBlockTextRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserBlockTextRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Range != nil { - { - size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEdit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.BlockId) > 0 { - i -= len(m.BlockId) - copy(dAtA[i:], m.BlockId) - i = encodeVarintEdit(dAtA, i, uint64(len(m.BlockId))) - i-- - dAtA[i] = 0x12 - } - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEdit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UserBlockJoin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserBlockJoin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserBlockJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEdit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UserBlockLeft) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserBlockLeft) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserBlockLeft) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEdit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UserBlockSelectRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserBlockSelectRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserBlockSelectRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BlockIdsArray) > 0 { - for iNdEx := len(m.BlockIdsArray) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.BlockIdsArray[iNdEx]) - copy(dAtA[i:], m.BlockIdsArray[iNdEx]) - i = encodeVarintEdit(dAtA, i, uint64(len(m.BlockIdsArray[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEdit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UserBlockFocus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserBlockFocus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserBlockFocus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BlockId) > 0 { - i -= len(m.BlockId) - copy(dAtA[i:], m.BlockId) - i = encodeVarintEdit(dAtA, i, uint64(len(m.BlockId))) - i-- - dAtA[i] = 0x12 - } - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEdit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEdit(dAtA []byte, offset int, v uint64) int { - offset -= sovEdit(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UserBlockTextRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovEdit(uint64(l)) - } - l = len(m.BlockId) - if l > 0 { - n += 1 + l + sovEdit(uint64(l)) - } - if m.Range != nil { - l = m.Range.Size() - n += 1 + l + sovEdit(uint64(l)) - } - return n -} - -func (m *UserBlockJoin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovEdit(uint64(l)) - } - return n -} - -func (m *UserBlockLeft) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovEdit(uint64(l)) - } - return n -} - -func (m *UserBlockSelectRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovEdit(uint64(l)) - } - if len(m.BlockIdsArray) > 0 { - for _, s := range m.BlockIdsArray { - l = len(s) - n += 1 + l + sovEdit(uint64(l)) - } - } - return n -} - -func (m *UserBlockFocus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovEdit(uint64(l)) - } - l = len(m.BlockId) - if l > 0 { - n += 1 + l + sovEdit(uint64(l)) - } - return n -} - -func sovEdit(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEdit(x uint64) (n int) { - return sovEdit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UserBlockTextRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserBlockTextRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserBlockTextRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Range == nil { - m.Range = &Range{} - } - if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEdit(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserBlockJoin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserBlockJoin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserBlockJoin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEdit(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserBlockLeft) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserBlockLeft: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserBlockLeft: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEdit(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserBlockSelectRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserBlockSelectRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserBlockSelectRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockIdsArray", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockIdsArray = append(m.BlockIdsArray, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEdit(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserBlockFocus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserBlockFocus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserBlockFocus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEdit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEdit - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEdit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEdit(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEdit - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEdit(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEdit - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEdit - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEdit - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEdit - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEdit - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEdit - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEdit = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEdit = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEdit = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pb/event.pb.go b/pb/event.pb.go deleted file mode 100644 index 575e70e4e..000000000 --- a/pb/event.pb.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: event.proto - -package pb - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Event struct { - // Types that are valid to be assigned to Message: - // *Event_AccountShow - // *Event_BlockShow - // *Event_BlockUpdate - // *Event_BlockCreate - Message isEvent_Message `protobuf_oneof:"message"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_2d17a9d3f0ddf27e, []int{0} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -type isEvent_Message interface { - isEvent_Message() - MarshalTo([]byte) (int, error) - Size() int -} - -type Event_AccountShow struct { - AccountShow *AccountShow `protobuf:"bytes,1,opt,name=accountShow,proto3,oneof" json:"accountShow,omitempty"` -} -type Event_BlockShow struct { - BlockShow *BlockShow `protobuf:"bytes,2,opt,name=blockShow,proto3,oneof" json:"blockShow,omitempty"` -} -type Event_BlockUpdate struct { - BlockUpdate *BlockUpdate `protobuf:"bytes,3,opt,name=blockUpdate,proto3,oneof" json:"blockUpdate,omitempty"` -} -type Event_BlockCreate struct { - BlockCreate *BlockCreate `protobuf:"bytes,4,opt,name=blockCreate,proto3,oneof" json:"blockCreate,omitempty"` -} - -func (*Event_AccountShow) isEvent_Message() {} -func (*Event_BlockShow) isEvent_Message() {} -func (*Event_BlockUpdate) isEvent_Message() {} -func (*Event_BlockCreate) isEvent_Message() {} - -func (m *Event) GetMessage() isEvent_Message { - if m != nil { - return m.Message - } - return nil -} - -func (m *Event) GetAccountShow() *AccountShow { - if x, ok := m.GetMessage().(*Event_AccountShow); ok { - return x.AccountShow - } - return nil -} - -func (m *Event) GetBlockShow() *BlockShow { - if x, ok := m.GetMessage().(*Event_BlockShow); ok { - return x.BlockShow - } - return nil -} - -func (m *Event) GetBlockUpdate() *BlockUpdate { - if x, ok := m.GetMessage().(*Event_BlockUpdate); ok { - return x.BlockUpdate - } - return nil -} - -func (m *Event) GetBlockCreate() *BlockCreate { - if x, ok := m.GetMessage().(*Event_BlockCreate); ok { - return x.BlockCreate - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Event) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Event_AccountShow)(nil), - (*Event_BlockShow)(nil), - (*Event_BlockUpdate)(nil), - (*Event_BlockCreate)(nil), - } -} - -func init() { - proto.RegisterType((*Event)(nil), "anytype.Event") -} - -func init() { proto.RegisterFile("event.proto", fileDescriptor_2d17a9d3f0ddf27e) } - -var fileDescriptor_2d17a9d3f0ddf27e = []byte{ - // 209 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x2d, 0x4b, 0xcd, - 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4f, 0xcc, 0xab, 0x2c, 0xa9, 0x2c, 0x48, - 0x95, 0xe2, 0x4d, 0x4c, 0x4e, 0xce, 0x2f, 0x85, 0x89, 0x4b, 0x71, 0x27, 0xe5, 0xe4, 0x27, 0x67, - 0x43, 0x38, 0x4a, 0x5f, 0x18, 0xb9, 0x58, 0x5d, 0x41, 0x9a, 0x84, 0x2c, 0xb8, 0xb8, 0xa1, 0xea, - 0x82, 0x33, 0xf2, 0xcb, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x44, 0xf4, 0xa0, 0x86, 0xe8, - 0x39, 0x22, 0xe4, 0x3c, 0x18, 0x82, 0x90, 0x95, 0x0a, 0x19, 0x71, 0x71, 0x82, 0x8d, 0x04, 0xeb, - 0x63, 0x02, 0xeb, 0x13, 0x82, 0xeb, 0x73, 0x82, 0xc9, 0x78, 0x30, 0x04, 0x21, 0x94, 0x81, 0x6c, - 0x03, 0x73, 0x42, 0x0b, 0x52, 0x12, 0x4b, 0x52, 0x25, 0x98, 0xd1, 0x6c, 0x73, 0x42, 0xc8, 0x81, - 0x6c, 0x43, 0x52, 0x0a, 0xd7, 0xe9, 0x5c, 0x94, 0x0a, 0xd2, 0xc9, 0x82, 0x4d, 0x27, 0x44, 0x0e, - 0xae, 0x13, 0xc2, 0x75, 0xe2, 0xe4, 0x62, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x75, 0x92, - 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, - 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa6, 0x82, 0xa4, 0x24, 0x36, - 0x70, 0xd8, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x58, 0xcc, 0xa8, 0x8c, 0x4f, 0x01, 0x00, - 0x00, -} - -func (m *Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Message != nil { - { - size := m.Message.Size() - i -= size - if _, err := m.Message.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Event_AccountShow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event_AccountShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.AccountShow != nil { - { - size, err := m.AccountShow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Event_BlockShow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event_BlockShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BlockShow != nil { - { - size, err := m.BlockShow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Event_BlockUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event_BlockUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BlockUpdate != nil { - { - size, err := m.BlockUpdate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Event_BlockCreate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event_BlockCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BlockCreate != nil { - { - size, err := m.BlockCreate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { - offset -= sovEvent(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Message != nil { - n += m.Message.Size() - } - return n -} - -func (m *Event_AccountShow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccountShow != nil { - l = m.AccountShow.Size() - n += 1 + l + sovEvent(uint64(l)) - } - return n -} -func (m *Event_BlockShow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockShow != nil { - l = m.BlockShow.Size() - n += 1 + l + sovEvent(uint64(l)) - } - return n -} -func (m *Event_BlockUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockUpdate != nil { - l = m.BlockUpdate.Size() - n += 1 + l + sovEvent(uint64(l)) - } - return n -} -func (m *Event_BlockCreate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockCreate != nil { - l = m.BlockCreate.Size() - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - -func sovEvent(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvent(x uint64) (n int) { - return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountShow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AccountShow{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Message = &Event_AccountShow{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockShow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockShow{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Message = &Event_BlockShow{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockUpdate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockUpdate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Message = &Event_BlockUpdate{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockCreate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BlockCreate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Message = &Event_BlockCreate{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvent(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvent - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvent - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvent - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pb/events.pb.go b/pb/events.pb.go new file mode 100644 index 000000000..b1ed9efb0 --- /dev/null +++ b/pb/events.pb.go @@ -0,0 +1,3456 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: events.proto + +package pb + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Event struct { + // Types that are valid to be assigned to Message: + // *EventMessageOfAccountShow + // *EventMessageOfBlockShow + // *EventMessageOfBlockUpdate + // *EventMessageOfBlockCreate + // *EventMessageOfUserBlockTextRange + // *EventMessageOfUserBlockJoin + // *EventMessageOfUserBlockLeft + // *EventMessageOfUserBlockSelectRange + // *EventMessageOfFilesUpload + Message isEventMessage `protobuf_oneof:"message"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Event.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +type isEventMessage interface { + isEventMessage() + MarshalTo([]byte) (int, error) + Size() int +} + +type EventMessageOfAccountShow struct { + AccountShow *EventAccountShow `protobuf:"bytes,1,opt,name=accountShow,proto3,oneof" json:"accountShow,omitempty"` +} +type EventMessageOfBlockShow struct { + BlockShow *EventBlockShow `protobuf:"bytes,2,opt,name=blockShow,proto3,oneof" json:"blockShow,omitempty"` +} +type EventMessageOfBlockUpdate struct { + BlockUpdate *EventBlockUpdate `protobuf:"bytes,3,opt,name=blockUpdate,proto3,oneof" json:"blockUpdate,omitempty"` +} +type EventMessageOfBlockCreate struct { + BlockCreate *EventBlockCreate `protobuf:"bytes,4,opt,name=blockCreate,proto3,oneof" json:"blockCreate,omitempty"` +} +type EventMessageOfUserBlockTextRange struct { + UserBlockTextRange *EventUserBlockTextRange `protobuf:"bytes,5,opt,name=userBlockTextRange,proto3,oneof" json:"userBlockTextRange,omitempty"` +} +type EventMessageOfUserBlockJoin struct { + UserBlockJoin *EventUserBlockJoin `protobuf:"bytes,6,opt,name=userBlockJoin,proto3,oneof" json:"userBlockJoin,omitempty"` +} +type EventMessageOfUserBlockLeft struct { + UserBlockLeft *EventUserBlockLeft `protobuf:"bytes,7,opt,name=userBlockLeft,proto3,oneof" json:"userBlockLeft,omitempty"` +} +type EventMessageOfUserBlockSelectRange struct { + UserBlockSelectRange *EventUserBlockSelectRange `protobuf:"bytes,8,opt,name=userBlockSelectRange,proto3,oneof" json:"userBlockSelectRange,omitempty"` +} +type EventMessageOfFilesUpload struct { + FilesUpload *EventBlockFilesUpload `protobuf:"bytes,9,opt,name=filesUpload,proto3,oneof" json:"filesUpload,omitempty"` +} + +func (*EventMessageOfAccountShow) isEventMessage() {} +func (*EventMessageOfBlockShow) isEventMessage() {} +func (*EventMessageOfBlockUpdate) isEventMessage() {} +func (*EventMessageOfBlockCreate) isEventMessage() {} +func (*EventMessageOfUserBlockTextRange) isEventMessage() {} +func (*EventMessageOfUserBlockJoin) isEventMessage() {} +func (*EventMessageOfUserBlockLeft) isEventMessage() {} +func (*EventMessageOfUserBlockSelectRange) isEventMessage() {} +func (*EventMessageOfFilesUpload) isEventMessage() {} + +func (m *Event) GetMessage() isEventMessage { + if m != nil { + return m.Message + } + return nil +} + +func (m *Event) GetAccountShow() *EventAccountShow { + if x, ok := m.GetMessage().(*EventMessageOfAccountShow); ok { + return x.AccountShow + } + return nil +} + +func (m *Event) GetBlockShow() *EventBlockShow { + if x, ok := m.GetMessage().(*EventMessageOfBlockShow); ok { + return x.BlockShow + } + return nil +} + +func (m *Event) GetBlockUpdate() *EventBlockUpdate { + if x, ok := m.GetMessage().(*EventMessageOfBlockUpdate); ok { + return x.BlockUpdate + } + return nil +} + +func (m *Event) GetBlockCreate() *EventBlockCreate { + if x, ok := m.GetMessage().(*EventMessageOfBlockCreate); ok { + return x.BlockCreate + } + return nil +} + +func (m *Event) GetUserBlockTextRange() *EventUserBlockTextRange { + if x, ok := m.GetMessage().(*EventMessageOfUserBlockTextRange); ok { + return x.UserBlockTextRange + } + return nil +} + +func (m *Event) GetUserBlockJoin() *EventUserBlockJoin { + if x, ok := m.GetMessage().(*EventMessageOfUserBlockJoin); ok { + return x.UserBlockJoin + } + return nil +} + +func (m *Event) GetUserBlockLeft() *EventUserBlockLeft { + if x, ok := m.GetMessage().(*EventMessageOfUserBlockLeft); ok { + return x.UserBlockLeft + } + return nil +} + +func (m *Event) GetUserBlockSelectRange() *EventUserBlockSelectRange { + if x, ok := m.GetMessage().(*EventMessageOfUserBlockSelectRange); ok { + return x.UserBlockSelectRange + } + return nil +} + +func (m *Event) GetFilesUpload() *EventBlockFilesUpload { + if x, ok := m.GetMessage().(*EventMessageOfFilesUpload); ok { + return x.FilesUpload + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Event) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*EventMessageOfAccountShow)(nil), + (*EventMessageOfBlockShow)(nil), + (*EventMessageOfBlockUpdate)(nil), + (*EventMessageOfBlockCreate)(nil), + (*EventMessageOfUserBlockTextRange)(nil), + (*EventMessageOfUserBlockJoin)(nil), + (*EventMessageOfUserBlockLeft)(nil), + (*EventMessageOfUserBlockSelectRange)(nil), + (*EventMessageOfFilesUpload)(nil), + } +} + +type EventAccount struct { +} + +func (m *EventAccount) Reset() { *m = EventAccount{} } +func (m *EventAccount) String() string { return proto.CompactTextString(m) } +func (*EventAccount) ProtoMessage() {} +func (*EventAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 0} +} +func (m *EventAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAccount.Merge(m, src) +} +func (m *EventAccount) XXX_Size() int { + return m.Size() +} +func (m *EventAccount) XXX_DiscardUnknown() { + xxx_messageInfo_EventAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAccount proto.InternalMessageInfo + +//* +// Message, that will be sent to the front on each account found after an AccountRecoverRequest +type EventAccountShow struct { + Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + Account *ModelAccount `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *EventAccountShow) Reset() { *m = EventAccountShow{} } +func (m *EventAccountShow) String() string { return proto.CompactTextString(m) } +func (*EventAccountShow) ProtoMessage() {} +func (*EventAccountShow) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 0, 0} +} +func (m *EventAccountShow) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAccountShow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAccountShow.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAccountShow) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAccountShow.Merge(m, src) +} +func (m *EventAccountShow) XXX_Size() int { + return m.Size() +} +func (m *EventAccountShow) XXX_DiscardUnknown() { + xxx_messageInfo_EventAccountShow.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAccountShow proto.InternalMessageInfo + +func (m *EventAccountShow) GetIndex() int64 { + if m != nil { + return m.Index + } + return 0 +} + +func (m *EventAccountShow) GetAccount() *ModelAccount { + if m != nil { + return m.Account + } + return nil +} + +type EventBlock struct { +} + +func (m *EventBlock) Reset() { *m = EventBlock{} } +func (m *EventBlock) String() string { return proto.CompactTextString(m) } +func (*EventBlock) ProtoMessage() {} +func (*EventBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 1} +} +func (m *EventBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlock.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlock.Merge(m, src) +} +func (m *EventBlock) XXX_Size() int { + return m.Size() +} +func (m *EventBlock) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlock proto.InternalMessageInfo + +type EventBlockShow struct { + Block *ModelBlock `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` +} + +func (m *EventBlockShow) Reset() { *m = EventBlockShow{} } +func (m *EventBlockShow) String() string { return proto.CompactTextString(m) } +func (*EventBlockShow) ProtoMessage() {} +func (*EventBlockShow) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 1, 0} +} +func (m *EventBlockShow) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockShow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockShow.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockShow) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockShow.Merge(m, src) +} +func (m *EventBlockShow) XXX_Size() int { + return m.Size() +} +func (m *EventBlockShow) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockShow.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockShow proto.InternalMessageInfo + +func (m *EventBlockShow) GetBlock() *ModelBlock { + if m != nil { + return m.Block + } + return nil +} + +type EventBlockUpdate struct { + Changes *BlockChanges `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"` +} + +func (m *EventBlockUpdate) Reset() { *m = EventBlockUpdate{} } +func (m *EventBlockUpdate) String() string { return proto.CompactTextString(m) } +func (*EventBlockUpdate) ProtoMessage() {} +func (*EventBlockUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 1, 1} +} +func (m *EventBlockUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockUpdate.Merge(m, src) +} +func (m *EventBlockUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventBlockUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockUpdate proto.InternalMessageInfo + +func (m *EventBlockUpdate) GetChanges() *BlockChanges { + if m != nil { + return m.Changes + } + return nil +} + +type EventBlockCreate struct { + Block *ModelBlock `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` +} + +func (m *EventBlockCreate) Reset() { *m = EventBlockCreate{} } +func (m *EventBlockCreate) String() string { return proto.CompactTextString(m) } +func (*EventBlockCreate) ProtoMessage() {} +func (*EventBlockCreate) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 1, 2} +} +func (m *EventBlockCreate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockCreate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockCreate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockCreate.Merge(m, src) +} +func (m *EventBlockCreate) XXX_Size() int { + return m.Size() +} +func (m *EventBlockCreate) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockCreate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockCreate proto.InternalMessageInfo + +func (m *EventBlockCreate) GetBlock() *ModelBlock { + if m != nil { + return m.Block + } + return nil +} + +//* +// Middleware to front end event message, that will be sent on one of this scenarios: +// Precondition: user A opened a block +// 1. User A drops a set of files/pictures/videos +// 2. User A creates a MediaBlock and drops a single media, that corresponds to its type. +type EventBlockFilesUpload struct { + FilePath []string `protobuf:"bytes,1,rep,name=filePath,proto3" json:"filePath,omitempty"` + BlockId string `protobuf:"bytes,2,opt,name=blockId,proto3" json:"blockId,omitempty"` +} + +func (m *EventBlockFilesUpload) Reset() { *m = EventBlockFilesUpload{} } +func (m *EventBlockFilesUpload) String() string { return proto.CompactTextString(m) } +func (*EventBlockFilesUpload) ProtoMessage() {} +func (*EventBlockFilesUpload) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 1, 3} +} +func (m *EventBlockFilesUpload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockFilesUpload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockFilesUpload.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockFilesUpload) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockFilesUpload.Merge(m, src) +} +func (m *EventBlockFilesUpload) XXX_Size() int { + return m.Size() +} +func (m *EventBlockFilesUpload) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockFilesUpload.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockFilesUpload proto.InternalMessageInfo + +func (m *EventBlockFilesUpload) GetFilePath() []string { + if m != nil { + return m.FilePath + } + return nil +} + +func (m *EventBlockFilesUpload) GetBlockId() string { + if m != nil { + return m.BlockId + } + return "" +} + +type EventUser struct { +} + +func (m *EventUser) Reset() { *m = EventUser{} } +func (m *EventUser) String() string { return proto.CompactTextString(m) } +func (*EventUser) ProtoMessage() {} +func (*EventUser) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 2} +} +func (m *EventUser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUser) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUser.Merge(m, src) +} +func (m *EventUser) XXX_Size() int { + return m.Size() +} +func (m *EventUser) XXX_DiscardUnknown() { + xxx_messageInfo_EventUser.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUser proto.InternalMessageInfo + +type EventUserBlock struct { +} + +func (m *EventUserBlock) Reset() { *m = EventUserBlock{} } +func (m *EventUserBlock) String() string { return proto.CompactTextString(m) } +func (*EventUserBlock) ProtoMessage() {} +func (*EventUserBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 2, 0} +} +func (m *EventUserBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUserBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUserBlock.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUserBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUserBlock.Merge(m, src) +} +func (m *EventUserBlock) XXX_Size() int { + return m.Size() +} +func (m *EventUserBlock) XXX_DiscardUnknown() { + xxx_messageInfo_EventUserBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUserBlock proto.InternalMessageInfo + +//* +// Middleware to front end event message, that will be sent in this scenario: +// Precondition: user A opened a block +// 1. User B opens the same block +// 2. User A receives a message about p.1 +type EventUserBlockJoin struct { + Account *EventAccount `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *EventUserBlockJoin) Reset() { *m = EventUserBlockJoin{} } +func (m *EventUserBlockJoin) String() string { return proto.CompactTextString(m) } +func (*EventUserBlockJoin) ProtoMessage() {} +func (*EventUserBlockJoin) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 2, 0, 0} +} +func (m *EventUserBlockJoin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUserBlockJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUserBlockJoin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUserBlockJoin) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUserBlockJoin.Merge(m, src) +} +func (m *EventUserBlockJoin) XXX_Size() int { + return m.Size() +} +func (m *EventUserBlockJoin) XXX_DiscardUnknown() { + xxx_messageInfo_EventUserBlockJoin.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUserBlockJoin proto.InternalMessageInfo + +func (m *EventUserBlockJoin) GetAccount() *EventAccount { + if m != nil { + return m.Account + } + return nil +} + +//* +// Middleware to front end event message, that will be sent in this scenario: +// Precondition: user A and user B opened the same block +// 1. User B closes the block +// 2. User A receives a message about p.1 +type EventUserBlockLeft struct { + Account *EventAccount `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *EventUserBlockLeft) Reset() { *m = EventUserBlockLeft{} } +func (m *EventUserBlockLeft) String() string { return proto.CompactTextString(m) } +func (*EventUserBlockLeft) ProtoMessage() {} +func (*EventUserBlockLeft) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 2, 0, 1} +} +func (m *EventUserBlockLeft) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUserBlockLeft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUserBlockLeft.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUserBlockLeft) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUserBlockLeft.Merge(m, src) +} +func (m *EventUserBlockLeft) XXX_Size() int { + return m.Size() +} +func (m *EventUserBlockLeft) XXX_DiscardUnknown() { + xxx_messageInfo_EventUserBlockLeft.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUserBlockLeft proto.InternalMessageInfo + +func (m *EventUserBlockLeft) GetAccount() *EventAccount { + if m != nil { + return m.Account + } + return nil +} + +//* +// Middleware to front end event message, that will be sent in this scenario: +// Precondition: user A and user B opened the same block +// 1. User B sets cursor or selects a text region into a text block +// 2. User A receives a message about p.1 +type EventUserBlockTextRange struct { + Account *EventAccount `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + BlockId string `protobuf:"bytes,2,opt,name=blockId,proto3" json:"blockId,omitempty"` + Range *ModelRange `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` +} + +func (m *EventUserBlockTextRange) Reset() { *m = EventUserBlockTextRange{} } +func (m *EventUserBlockTextRange) String() string { return proto.CompactTextString(m) } +func (*EventUserBlockTextRange) ProtoMessage() {} +func (*EventUserBlockTextRange) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 2, 0, 2} +} +func (m *EventUserBlockTextRange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUserBlockTextRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUserBlockTextRange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUserBlockTextRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUserBlockTextRange.Merge(m, src) +} +func (m *EventUserBlockTextRange) XXX_Size() int { + return m.Size() +} +func (m *EventUserBlockTextRange) XXX_DiscardUnknown() { + xxx_messageInfo_EventUserBlockTextRange.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUserBlockTextRange proto.InternalMessageInfo + +func (m *EventUserBlockTextRange) GetAccount() *EventAccount { + if m != nil { + return m.Account + } + return nil +} + +func (m *EventUserBlockTextRange) GetBlockId() string { + if m != nil { + return m.BlockId + } + return "" +} + +func (m *EventUserBlockTextRange) GetRange() *ModelRange { + if m != nil { + return m.Range + } + return nil +} + +//* +// Middleware to front end event message, that will be sent in this scenario: +// Precondition: user A and user B opened the same block +// 1. User B selects some inner blocks +// 2. User A receives a message about p.1 +type EventUserBlockSelectRange struct { + Account *EventAccount `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + BlockIdsArray []string `protobuf:"bytes,2,rep,name=blockIdsArray,proto3" json:"blockIdsArray,omitempty"` +} + +func (m *EventUserBlockSelectRange) Reset() { *m = EventUserBlockSelectRange{} } +func (m *EventUserBlockSelectRange) String() string { return proto.CompactTextString(m) } +func (*EventUserBlockSelectRange) ProtoMessage() {} +func (*EventUserBlockSelectRange) Descriptor() ([]byte, []int) { + return fileDescriptor_8f22242cb04491f9, []int{0, 2, 0, 3} +} +func (m *EventUserBlockSelectRange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUserBlockSelectRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUserBlockSelectRange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUserBlockSelectRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUserBlockSelectRange.Merge(m, src) +} +func (m *EventUserBlockSelectRange) XXX_Size() int { + return m.Size() +} +func (m *EventUserBlockSelectRange) XXX_DiscardUnknown() { + xxx_messageInfo_EventUserBlockSelectRange.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUserBlockSelectRange proto.InternalMessageInfo + +func (m *EventUserBlockSelectRange) GetAccount() *EventAccount { + if m != nil { + return m.Account + } + return nil +} + +func (m *EventUserBlockSelectRange) GetBlockIdsArray() []string { + if m != nil { + return m.BlockIdsArray + } + return nil +} + +func init() { + proto.RegisterType((*Event)(nil), "anytype.Event") + proto.RegisterType((*EventAccount)(nil), "anytype.Event.Account") + proto.RegisterType((*EventAccountShow)(nil), "anytype.Event.Account.Show") + proto.RegisterType((*EventBlock)(nil), "anytype.Event.Block") + proto.RegisterType((*EventBlockShow)(nil), "anytype.Event.Block.Show") + proto.RegisterType((*EventBlockUpdate)(nil), "anytype.Event.Block.Update") + proto.RegisterType((*EventBlockCreate)(nil), "anytype.Event.Block.Create") + proto.RegisterType((*EventBlockFilesUpload)(nil), "anytype.Event.Block.FilesUpload") + proto.RegisterType((*EventUser)(nil), "anytype.Event.User") + proto.RegisterType((*EventUserBlock)(nil), "anytype.Event.User.Block") + proto.RegisterType((*EventUserBlockJoin)(nil), "anytype.Event.User.Block.Join") + proto.RegisterType((*EventUserBlockLeft)(nil), "anytype.Event.User.Block.Left") + proto.RegisterType((*EventUserBlockTextRange)(nil), "anytype.Event.User.Block.TextRange") + proto.RegisterType((*EventUserBlockSelectRange)(nil), "anytype.Event.User.Block.SelectRange") +} + +func init() { proto.RegisterFile("events.proto", fileDescriptor_8f22242cb04491f9) } + +var fileDescriptor_8f22242cb04491f9 = []byte{ + // 567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcf, 0x6e, 0xd3, 0x40, + 0x10, 0xc6, 0xed, 0xfc, 0x73, 0x3d, 0x6e, 0x2e, 0xab, 0x80, 0xcc, 0x82, 0xac, 0x88, 0x3f, 0x52, + 0xc5, 0xc1, 0xa0, 0xc2, 0xa1, 0x3d, 0xa1, 0x26, 0x50, 0x05, 0x04, 0x08, 0x6d, 0xc9, 0x01, 0x38, + 0x39, 0xf6, 0xb6, 0x89, 0x70, 0x6d, 0xcb, 0x76, 0xa1, 0x39, 0xf3, 0x02, 0x3c, 0x16, 0xc7, 0x1e, + 0xb9, 0x20, 0xa1, 0xe4, 0xc2, 0xb5, 0x6f, 0x80, 0x76, 0xbc, 0x76, 0xec, 0xc8, 0x01, 0xe5, 0x38, + 0xe3, 0xef, 0xfb, 0x4d, 0x76, 0xf6, 0xdb, 0xc0, 0x2e, 0xff, 0xc2, 0x83, 0x34, 0xb1, 0xa3, 0x38, + 0x4c, 0x43, 0xa2, 0x39, 0xc1, 0x3c, 0x9d, 0x47, 0x9c, 0xee, 0x9e, 0x87, 0x1e, 0xf7, 0x65, 0x9b, + 0x76, 0xdd, 0xa9, 0x13, 0x9c, 0x71, 0x59, 0xde, 0xfd, 0x05, 0xd0, 0x7e, 0x21, 0x6c, 0xe4, 0x19, + 0x18, 0x8e, 0xeb, 0x86, 0x17, 0x41, 0x7a, 0x32, 0x0d, 0xbf, 0x9a, 0x6a, 0x5f, 0xdd, 0x33, 0xf6, + 0x6f, 0xdb, 0x92, 0x62, 0xa3, 0xc8, 0x3e, 0xca, 0x14, 0xb6, 0x90, 0x8c, 0x14, 0x56, 0x76, 0x90, + 0x43, 0xd0, 0x27, 0x7e, 0xe8, 0x7e, 0x46, 0x7b, 0x03, 0xed, 0xb7, 0xd6, 0xec, 0x03, 0xf1, 0x3d, + 0x37, 0xaf, 0xd4, 0x62, 0x36, 0x16, 0xe3, 0xc8, 0x73, 0x52, 0x6e, 0x36, 0x6b, 0x67, 0x67, 0xe6, + 0x4c, 0x22, 0x66, 0x97, 0x1c, 0x05, 0x60, 0x18, 0x73, 0x01, 0x68, 0xfd, 0x03, 0x90, 0x49, 0x0a, + 0x40, 0x56, 0x92, 0x31, 0x90, 0x8b, 0x84, 0xc7, 0x28, 0x79, 0xcf, 0x2f, 0x53, 0x26, 0x96, 0x64, + 0xb6, 0x91, 0x73, 0x6f, 0x8d, 0x33, 0x4e, 0x78, 0x2c, 0x61, 0x85, 0x74, 0xa4, 0xb0, 0x1a, 0x00, + 0x39, 0x86, 0x6e, 0xd1, 0x7d, 0x15, 0xce, 0x02, 0xb3, 0x83, 0x44, 0x6b, 0x33, 0x51, 0xa8, 0x46, + 0x0a, 0xab, 0xda, 0x2a, 0x9c, 0xd7, 0xfc, 0x34, 0x35, 0xb5, 0xff, 0x71, 0x84, 0xaa, 0xc2, 0x11, + 0x0d, 0xf2, 0x09, 0x7a, 0x45, 0xe3, 0x84, 0xfb, 0xdc, 0x95, 0x07, 0xdd, 0x41, 0xdc, 0x83, 0xcd, + 0xb8, 0x92, 0x78, 0xa4, 0xb0, 0x5a, 0x08, 0x79, 0x0e, 0xc6, 0xe9, 0xcc, 0xe7, 0xc9, 0x38, 0xf2, + 0x43, 0xc7, 0x33, 0x75, 0x64, 0xf6, 0x6b, 0x2f, 0xe1, 0x78, 0xa5, 0x13, 0x37, 0x51, 0xb2, 0xd1, + 0x0f, 0xa0, 0xc9, 0x94, 0xd1, 0xb7, 0xd0, 0xc2, 0x78, 0xf4, 0xa0, 0x3d, 0x0b, 0x3c, 0x7e, 0x89, + 0xa1, 0x6c, 0xb2, 0xac, 0x20, 0x8f, 0x41, 0x93, 0xf1, 0x93, 0x69, 0xbb, 0x59, 0x8c, 0x7a, 0x23, + 0x12, 0x9f, 0x87, 0x95, 0xe5, 0x32, 0x7a, 0xad, 0x42, 0x1b, 0xe7, 0xd3, 0x7d, 0x49, 0x7e, 0x08, + 0x6d, 0x4c, 0x81, 0x8c, 0x7b, 0x6f, 0x8d, 0x80, 0x62, 0x96, 0x49, 0xe8, 0x21, 0x74, 0x64, 0xda, + 0x1e, 0x81, 0x26, 0x5f, 0x91, 0xf4, 0xdd, 0x28, 0x7c, 0xe8, 0x18, 0x66, 0x1f, 0x59, 0xae, 0xa2, + 0x4f, 0xa1, 0x23, 0x73, 0xb6, 0xcd, 0xc0, 0x21, 0x18, 0xa5, 0x3d, 0x11, 0x0a, 0x3b, 0x62, 0x4f, + 0xef, 0x9c, 0x74, 0x6a, 0xaa, 0xfd, 0xe6, 0x9e, 0xce, 0x8a, 0x9a, 0x98, 0xa0, 0xa1, 0xe7, 0xa5, + 0x87, 0xbb, 0xd0, 0x59, 0x5e, 0xd2, 0xeb, 0x06, 0xb4, 0xc4, 0x3d, 0xd2, 0x3f, 0x8d, 0xfc, 0xf0, + 0x07, 0xd0, 0xc2, 0x50, 0x95, 0x16, 0xa8, 0xae, 0x2d, 0xb0, 0xf2, 0xda, 0x57, 0x0b, 0x3c, 0x80, + 0x16, 0xc6, 0x68, 0x7b, 0xe7, 0x37, 0x15, 0xf4, 0xd5, 0xb3, 0xd8, 0xda, 0xbf, 0xf9, 0x80, 0x62, + 0xa3, 0x31, 0x66, 0xb8, 0x59, 0xbb, 0x51, 0x1c, 0xc8, 0x32, 0x09, 0xe5, 0x60, 0x94, 0x03, 0xbb, + 0xfd, 0xcf, 0xb8, 0x0f, 0x5d, 0x39, 0x37, 0x39, 0x8a, 0x63, 0x67, 0x6e, 0x36, 0xf0, 0x22, 0xaa, + 0xcd, 0x81, 0x0e, 0xda, 0x39, 0x4f, 0x12, 0xe7, 0x8c, 0x0f, 0xee, 0xfc, 0x58, 0x58, 0xea, 0xd5, + 0xc2, 0x52, 0x7f, 0x2f, 0x2c, 0xf5, 0xfb, 0xd2, 0x52, 0xae, 0x96, 0x96, 0xf2, 0x73, 0x69, 0x29, + 0x1f, 0x1b, 0xd1, 0x64, 0xd2, 0xc1, 0x3f, 0xe1, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xad, + 0x8b, 0xe3, 0x03, 0xba, 0x05, 0x00, 0x00, +} + +func (m *Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Message != nil { + { + size := m.Message.Size() + i -= size + if _, err := m.Message.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *EventMessageOfAccountShow) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfAccountShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AccountShow != nil { + { + size, err := m.AccountShow.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfBlockShow) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfBlockShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BlockShow != nil { + { + size, err := m.BlockShow.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfBlockUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfBlockUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BlockUpdate != nil { + { + size, err := m.BlockUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfBlockCreate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfBlockCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BlockCreate != nil { + { + size, err := m.BlockCreate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfUserBlockTextRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfUserBlockTextRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UserBlockTextRange != nil { + { + size, err := m.UserBlockTextRange.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfUserBlockJoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfUserBlockJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UserBlockJoin != nil { + { + size, err := m.UserBlockJoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfUserBlockLeft) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfUserBlockLeft) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UserBlockLeft != nil { + { + size, err := m.UserBlockLeft.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfUserBlockSelectRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfUserBlockSelectRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UserBlockSelectRange != nil { + { + size, err := m.UserBlockSelectRange.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *EventMessageOfFilesUpload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessageOfFilesUpload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FilesUpload != nil { + { + size, err := m.FilesUpload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *EventAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *EventAccountShow) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAccountShow) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAccountShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Index != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventBlock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *EventBlockShow) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockShow) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockShow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Block != nil { + { + size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBlockUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Changes != nil { + { + size, err := m.Changes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBlockCreate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockCreate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Block != nil { + { + size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBlockFilesUpload) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockFilesUpload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockFilesUpload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BlockId) > 0 { + i -= len(m.BlockId) + copy(dAtA[i:], m.BlockId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BlockId))) + i-- + dAtA[i] = 0x12 + } + if len(m.FilePath) > 0 { + for iNdEx := len(m.FilePath) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FilePath[iNdEx]) + copy(dAtA[i:], m.FilePath[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.FilePath[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EventUser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *EventUserBlock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUserBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUserBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *EventUserBlockJoin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUserBlockJoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUserBlockJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUserBlockLeft) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUserBlockLeft) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUserBlockLeft) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUserBlockTextRange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUserBlockTextRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUserBlockTextRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Range != nil { + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.BlockId) > 0 { + i -= len(m.BlockId) + copy(dAtA[i:], m.BlockId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BlockId))) + i-- + dAtA[i] = 0x12 + } + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUserBlockSelectRange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUserBlockSelectRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUserBlockSelectRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BlockIdsArray) > 0 { + for iNdEx := len(m.BlockIdsArray) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BlockIdsArray[iNdEx]) + copy(dAtA[i:], m.BlockIdsArray[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BlockIdsArray[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Message != nil { + n += m.Message.Size() + } + return n +} + +func (m *EventMessageOfAccountShow) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccountShow != nil { + l = m.AccountShow.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfBlockShow) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockShow != nil { + l = m.BlockShow.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfBlockUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockUpdate != nil { + l = m.BlockUpdate.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfBlockCreate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockCreate != nil { + l = m.BlockCreate.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfUserBlockTextRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UserBlockTextRange != nil { + l = m.UserBlockTextRange.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfUserBlockJoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UserBlockJoin != nil { + l = m.UserBlockJoin.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfUserBlockLeft) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UserBlockLeft != nil { + l = m.UserBlockLeft.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfUserBlockSelectRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UserBlockSelectRange != nil { + l = m.UserBlockSelectRange.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventMessageOfFilesUpload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FilesUpload != nil { + l = m.FilesUpload.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *EventAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *EventAccountShow) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Index != 0 { + n += 1 + sovEvents(uint64(m.Index)) + } + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *EventBlockShow) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Block != nil { + l = m.Block.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlockUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Changes != nil { + l = m.Changes.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlockCreate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Block != nil { + l = m.Block.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlockFilesUpload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FilePath) > 0 { + for _, s := range m.FilePath { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + l = len(m.BlockId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *EventUserBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *EventUserBlockJoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUserBlockLeft) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUserBlockTextRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.BlockId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Range != nil { + l = m.Range.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUserBlockSelectRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.BlockIdsArray) > 0 { + for _, s := range m.BlockIdsArray { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountShow", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventAccountShow{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfAccountShow{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockShow", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventBlockShow{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfBlockShow{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventBlockUpdate{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfBlockUpdate{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockCreate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventBlockCreate{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfBlockCreate{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserBlockTextRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventUserBlockTextRange{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfUserBlockTextRange{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserBlockJoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventUserBlockJoin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfUserBlockJoin{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserBlockLeft", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventUserBlockLeft{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfUserBlockLeft{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserBlockSelectRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventUserBlockSelectRange{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfUserBlockSelectRange{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilesUpload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EventBlockFilesUpload{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &EventMessageOfFilesUpload{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Account: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAccountShow) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Show: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Show: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &ModelAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockShow) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Show: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Show: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Block == nil { + m.Block = &ModelBlock{} + } + if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Update: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Update: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Changes == nil { + m.Changes = &BlockChanges{} + } + if err := m.Changes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockCreate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Create: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Create: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Block == nil { + m.Block = &ModelBlock{} + } + if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockFilesUpload) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesUpload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesUpload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilePath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FilePath = append(m.FilePath, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: User: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUserBlock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUserBlockJoin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Join: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Join: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &EventAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUserBlockLeft) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Left: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Left: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &EventAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUserBlockTextRange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TextRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TextRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &EventAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Range == nil { + m.Range = &ModelRange{} + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUserBlockSelectRange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelectRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &EventAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockIdsArray", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockIdsArray = append(m.BlockIdsArray, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pb/file.pb.go b/pb/file.pb.go deleted file mode 100644 index e9aa075ea..000000000 --- a/pb/file.pb.go +++ /dev/null @@ -1,2910 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: file.proto - -package pb - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ImageSize int32 - -const ( - ImageSize_LARGE ImageSize = 0 - ImageSize_SMALL ImageSize = 1 - ImageSize_THUMB ImageSize = 2 -) - -var ImageSize_name = map[int32]string{ - 0: "LARGE", - 1: "SMALL", - 2: "THUMB", -} - -var ImageSize_value = map[string]int32{ - "LARGE": 0, - "SMALL": 1, - "THUMB": 2, -} - -func (x ImageSize) String() string { - return proto.EnumName(ImageSize_name, int32(x)) -} - -func (ImageSize) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{0} -} - -type VideoSize int32 - -const ( - VideoSize_SD_360p VideoSize = 0 - VideoSize_SD_480p VideoSize = 1 - VideoSize_HD_720p VideoSize = 2 - VideoSize_HD_1080p VideoSize = 3 - VideoSize_UHD_1440p VideoSize = 4 - VideoSize_UHD_2160p VideoSize = 5 -) - -var VideoSize_name = map[int32]string{ - 0: "SD_360p", - 1: "SD_480p", - 2: "HD_720p", - 3: "HD_1080p", - 4: "UHD_1440p", - 5: "UHD_2160p", -} - -var VideoSize_value = map[string]int32{ - "SD_360p": 0, - "SD_480p": 1, - "HD_720p": 2, - "HD_1080p": 3, - "UHD_1440p": 4, - "UHD_2160p": 5, -} - -func (x VideoSize) String() string { - return proto.EnumName(VideoSize_name, int32(x)) -} - -func (VideoSize) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{1} -} - -type IpfsGetFileResponse_Error_Code int32 - -const ( - IpfsGetFileResponse_Error_NULL IpfsGetFileResponse_Error_Code = 0 - IpfsGetFileResponse_Error_UNKNOWN_ERROR IpfsGetFileResponse_Error_Code = 1 - IpfsGetFileResponse_Error_BAD_INPUT IpfsGetFileResponse_Error_Code = 2 - IpfsGetFileResponse_Error_NOT_FOUND IpfsGetFileResponse_Error_Code = 101 - IpfsGetFileResponse_Error_TIMEOUT IpfsGetFileResponse_Error_Code = 102 -) - -var IpfsGetFileResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "NOT_FOUND", - 102: "TIMEOUT", -} - -var IpfsGetFileResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "NOT_FOUND": 101, - "TIMEOUT": 102, -} - -func (x IpfsGetFileResponse_Error_Code) String() string { - return proto.EnumName(IpfsGetFileResponse_Error_Code_name, int32(x)) -} - -func (IpfsGetFileResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{3, 0, 0} -} - -type ImageGetBlobResponse_Error_Code int32 - -const ( - ImageGetBlobResponse_Error_NULL ImageGetBlobResponse_Error_Code = 0 - ImageGetBlobResponse_Error_UNKNOWN_ERROR ImageGetBlobResponse_Error_Code = 1 - ImageGetBlobResponse_Error_BAD_INPUT ImageGetBlobResponse_Error_Code = 2 - ImageGetBlobResponse_Error_NOT_FOUND ImageGetBlobResponse_Error_Code = 101 - ImageGetBlobResponse_Error_TIMEOUT ImageGetBlobResponse_Error_Code = 102 -) - -var ImageGetBlobResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "NOT_FOUND", - 102: "TIMEOUT", -} - -var ImageGetBlobResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "NOT_FOUND": 101, - "TIMEOUT": 102, -} - -func (x ImageGetBlobResponse_Error_Code) String() string { - return proto.EnumName(ImageGetBlobResponse_Error_Code_name, int32(x)) -} - -func (ImageGetBlobResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{5, 0, 0} -} - -type ImageGetFileResponse_Error_Code int32 - -const ( - ImageGetFileResponse_Error_NULL ImageGetFileResponse_Error_Code = 0 - ImageGetFileResponse_Error_UNKNOWN_ERROR ImageGetFileResponse_Error_Code = 1 - ImageGetFileResponse_Error_BAD_INPUT ImageGetFileResponse_Error_Code = 2 - ImageGetFileResponse_Error_NOT_FOUND ImageGetFileResponse_Error_Code = 101 - ImageGetFileResponse_Error_TIMEOUT ImageGetFileResponse_Error_Code = 102 -) - -var ImageGetFileResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "NOT_FOUND", - 102: "TIMEOUT", -} - -var ImageGetFileResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "NOT_FOUND": 101, - "TIMEOUT": 102, -} - -func (x ImageGetFileResponse_Error_Code) String() string { - return proto.EnumName(ImageGetFileResponse_Error_Code_name, int32(x)) -} - -func (ImageGetFileResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{7, 0, 0} -} - -type Image struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Sizes []ImageSize `protobuf:"varint,2,rep,packed,name=sizes,proto3,enum=anytype.ImageSize" json:"sizes,omitempty"` -} - -func (m *Image) Reset() { *m = Image{} } -func (m *Image) String() string { return proto.CompactTextString(m) } -func (*Image) ProtoMessage() {} -func (*Image) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{0} -} -func (m *Image) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Image.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Image) XXX_Merge(src proto.Message) { - xxx_messageInfo_Image.Merge(m, src) -} -func (m *Image) XXX_Size() int { - return m.Size() -} -func (m *Image) XXX_DiscardUnknown() { - xxx_messageInfo_Image.DiscardUnknown(m) -} - -var xxx_messageInfo_Image proto.InternalMessageInfo - -func (m *Image) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Image) GetSizes() []ImageSize { - if m != nil { - return m.Sizes - } - return nil -} - -type Video struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Sizes []VideoSize `protobuf:"varint,2,rep,packed,name=sizes,proto3,enum=anytype.VideoSize" json:"sizes,omitempty"` -} - -func (m *Video) Reset() { *m = Video{} } -func (m *Video) String() string { return proto.CompactTextString(m) } -func (*Video) ProtoMessage() {} -func (*Video) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{1} -} -func (m *Video) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Video) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Video.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Video) XXX_Merge(src proto.Message) { - xxx_messageInfo_Video.Merge(m, src) -} -func (m *Video) XXX_Size() int { - return m.Size() -} -func (m *Video) XXX_DiscardUnknown() { - xxx_messageInfo_Video.DiscardUnknown(m) -} - -var xxx_messageInfo_Video proto.InternalMessageInfo - -func (m *Video) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Video) GetSizes() []VideoSize { - if m != nil { - return m.Sizes - } - return nil -} - -type IpfsGetFileRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *IpfsGetFileRequest) Reset() { *m = IpfsGetFileRequest{} } -func (m *IpfsGetFileRequest) String() string { return proto.CompactTextString(m) } -func (*IpfsGetFileRequest) ProtoMessage() {} -func (*IpfsGetFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{2} -} -func (m *IpfsGetFileRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IpfsGetFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IpfsGetFileRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IpfsGetFileRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IpfsGetFileRequest.Merge(m, src) -} -func (m *IpfsGetFileRequest) XXX_Size() int { - return m.Size() -} -func (m *IpfsGetFileRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IpfsGetFileRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_IpfsGetFileRequest proto.InternalMessageInfo - -func (m *IpfsGetFileRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type IpfsGetFileResponse struct { - Error *IpfsGetFileResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Media string `protobuf:"bytes,3,opt,name=media,proto3" json:"media,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *IpfsGetFileResponse) Reset() { *m = IpfsGetFileResponse{} } -func (m *IpfsGetFileResponse) String() string { return proto.CompactTextString(m) } -func (*IpfsGetFileResponse) ProtoMessage() {} -func (*IpfsGetFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{3} -} -func (m *IpfsGetFileResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IpfsGetFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IpfsGetFileResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IpfsGetFileResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IpfsGetFileResponse.Merge(m, src) -} -func (m *IpfsGetFileResponse) XXX_Size() int { - return m.Size() -} -func (m *IpfsGetFileResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IpfsGetFileResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IpfsGetFileResponse proto.InternalMessageInfo - -func (m *IpfsGetFileResponse) GetError() *IpfsGetFileResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *IpfsGetFileResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *IpfsGetFileResponse) GetMedia() string { - if m != nil { - return m.Media - } - return "" -} - -func (m *IpfsGetFileResponse) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type IpfsGetFileResponse_Error struct { - Code IpfsGetFileResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.IpfsGetFileResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *IpfsGetFileResponse_Error) Reset() { *m = IpfsGetFileResponse_Error{} } -func (m *IpfsGetFileResponse_Error) String() string { return proto.CompactTextString(m) } -func (*IpfsGetFileResponse_Error) ProtoMessage() {} -func (*IpfsGetFileResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{3, 0} -} -func (m *IpfsGetFileResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IpfsGetFileResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IpfsGetFileResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IpfsGetFileResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_IpfsGetFileResponse_Error.Merge(m, src) -} -func (m *IpfsGetFileResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *IpfsGetFileResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_IpfsGetFileResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_IpfsGetFileResponse_Error proto.InternalMessageInfo - -func (m *IpfsGetFileResponse_Error) GetCode() IpfsGetFileResponse_Error_Code { - if m != nil { - return m.Code - } - return IpfsGetFileResponse_Error_NULL -} - -func (m *IpfsGetFileResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type ImageGetBlobRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Size_ ImageSize `protobuf:"varint,2,opt,name=size,proto3,enum=anytype.ImageSize" json:"size,omitempty"` -} - -func (m *ImageGetBlobRequest) Reset() { *m = ImageGetBlobRequest{} } -func (m *ImageGetBlobRequest) String() string { return proto.CompactTextString(m) } -func (*ImageGetBlobRequest) ProtoMessage() {} -func (*ImageGetBlobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{4} -} -func (m *ImageGetBlobRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageGetBlobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImageGetBlobRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImageGetBlobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageGetBlobRequest.Merge(m, src) -} -func (m *ImageGetBlobRequest) XXX_Size() int { - return m.Size() -} -func (m *ImageGetBlobRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ImageGetBlobRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageGetBlobRequest proto.InternalMessageInfo - -func (m *ImageGetBlobRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ImageGetBlobRequest) GetSize_() ImageSize { - if m != nil { - return m.Size_ - } - return ImageSize_LARGE -} - -type ImageGetBlobResponse struct { - Error *ImageGetBlobResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Blob []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"` -} - -func (m *ImageGetBlobResponse) Reset() { *m = ImageGetBlobResponse{} } -func (m *ImageGetBlobResponse) String() string { return proto.CompactTextString(m) } -func (*ImageGetBlobResponse) ProtoMessage() {} -func (*ImageGetBlobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{5} -} -func (m *ImageGetBlobResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageGetBlobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImageGetBlobResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImageGetBlobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageGetBlobResponse.Merge(m, src) -} -func (m *ImageGetBlobResponse) XXX_Size() int { - return m.Size() -} -func (m *ImageGetBlobResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ImageGetBlobResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageGetBlobResponse proto.InternalMessageInfo - -func (m *ImageGetBlobResponse) GetError() *ImageGetBlobResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *ImageGetBlobResponse) GetBlob() []byte { - if m != nil { - return m.Blob - } - return nil -} - -type ImageGetBlobResponse_Error struct { - Code ImageGetBlobResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.ImageGetBlobResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *ImageGetBlobResponse_Error) Reset() { *m = ImageGetBlobResponse_Error{} } -func (m *ImageGetBlobResponse_Error) String() string { return proto.CompactTextString(m) } -func (*ImageGetBlobResponse_Error) ProtoMessage() {} -func (*ImageGetBlobResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{5, 0} -} -func (m *ImageGetBlobResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageGetBlobResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImageGetBlobResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImageGetBlobResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageGetBlobResponse_Error.Merge(m, src) -} -func (m *ImageGetBlobResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *ImageGetBlobResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_ImageGetBlobResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageGetBlobResponse_Error proto.InternalMessageInfo - -func (m *ImageGetBlobResponse_Error) GetCode() ImageGetBlobResponse_Error_Code { - if m != nil { - return m.Code - } - return ImageGetBlobResponse_Error_NULL -} - -func (m *ImageGetBlobResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type ImageGetFileRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Size_ ImageSize `protobuf:"varint,2,opt,name=size,proto3,enum=anytype.ImageSize" json:"size,omitempty"` -} - -func (m *ImageGetFileRequest) Reset() { *m = ImageGetFileRequest{} } -func (m *ImageGetFileRequest) String() string { return proto.CompactTextString(m) } -func (*ImageGetFileRequest) ProtoMessage() {} -func (*ImageGetFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{6} -} -func (m *ImageGetFileRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageGetFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImageGetFileRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImageGetFileRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageGetFileRequest.Merge(m, src) -} -func (m *ImageGetFileRequest) XXX_Size() int { - return m.Size() -} -func (m *ImageGetFileRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ImageGetFileRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageGetFileRequest proto.InternalMessageInfo - -func (m *ImageGetFileRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ImageGetFileRequest) GetSize_() ImageSize { - if m != nil { - return m.Size_ - } - return ImageSize_LARGE -} - -type ImageGetFileResponse struct { - Error *ImageGetFileResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - LocalPath string `protobuf:"bytes,2,opt,name=localPath,proto3" json:"localPath,omitempty"` -} - -func (m *ImageGetFileResponse) Reset() { *m = ImageGetFileResponse{} } -func (m *ImageGetFileResponse) String() string { return proto.CompactTextString(m) } -func (*ImageGetFileResponse) ProtoMessage() {} -func (*ImageGetFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{7} -} -func (m *ImageGetFileResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageGetFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImageGetFileResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImageGetFileResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageGetFileResponse.Merge(m, src) -} -func (m *ImageGetFileResponse) XXX_Size() int { - return m.Size() -} -func (m *ImageGetFileResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ImageGetFileResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageGetFileResponse proto.InternalMessageInfo - -func (m *ImageGetFileResponse) GetError() *ImageGetFileResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *ImageGetFileResponse) GetLocalPath() string { - if m != nil { - return m.LocalPath - } - return "" -} - -type ImageGetFileResponse_Error struct { - Code ImageGetFileResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.ImageGetFileResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *ImageGetFileResponse_Error) Reset() { *m = ImageGetFileResponse_Error{} } -func (m *ImageGetFileResponse_Error) String() string { return proto.CompactTextString(m) } -func (*ImageGetFileResponse_Error) ProtoMessage() {} -func (*ImageGetFileResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_9188e3b7e55e1162, []int{7, 0} -} -func (m *ImageGetFileResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImageGetFileResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImageGetFileResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImageGetFileResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImageGetFileResponse_Error.Merge(m, src) -} -func (m *ImageGetFileResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *ImageGetFileResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_ImageGetFileResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_ImageGetFileResponse_Error proto.InternalMessageInfo - -func (m *ImageGetFileResponse_Error) GetCode() ImageGetFileResponse_Error_Code { - if m != nil { - return m.Code - } - return ImageGetFileResponse_Error_NULL -} - -func (m *ImageGetFileResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func init() { - proto.RegisterEnum("anytype.ImageSize", ImageSize_name, ImageSize_value) - proto.RegisterEnum("anytype.VideoSize", VideoSize_name, VideoSize_value) - proto.RegisterEnum("anytype.IpfsGetFileResponse_Error_Code", IpfsGetFileResponse_Error_Code_name, IpfsGetFileResponse_Error_Code_value) - proto.RegisterEnum("anytype.ImageGetBlobResponse_Error_Code", ImageGetBlobResponse_Error_Code_name, ImageGetBlobResponse_Error_Code_value) - proto.RegisterEnum("anytype.ImageGetFileResponse_Error_Code", ImageGetFileResponse_Error_Code_name, ImageGetFileResponse_Error_Code_value) - proto.RegisterType((*Image)(nil), "anytype.Image") - proto.RegisterType((*Video)(nil), "anytype.Video") - proto.RegisterType((*IpfsGetFileRequest)(nil), "anytype.IpfsGetFileRequest") - proto.RegisterType((*IpfsGetFileResponse)(nil), "anytype.IpfsGetFileResponse") - proto.RegisterType((*IpfsGetFileResponse_Error)(nil), "anytype.IpfsGetFileResponse.Error") - proto.RegisterType((*ImageGetBlobRequest)(nil), "anytype.ImageGetBlobRequest") - proto.RegisterType((*ImageGetBlobResponse)(nil), "anytype.ImageGetBlobResponse") - proto.RegisterType((*ImageGetBlobResponse_Error)(nil), "anytype.ImageGetBlobResponse.Error") - proto.RegisterType((*ImageGetFileRequest)(nil), "anytype.ImageGetFileRequest") - proto.RegisterType((*ImageGetFileResponse)(nil), "anytype.ImageGetFileResponse") - proto.RegisterType((*ImageGetFileResponse_Error)(nil), "anytype.ImageGetFileResponse.Error") -} - -func init() { proto.RegisterFile("file.proto", fileDescriptor_9188e3b7e55e1162) } - -var fileDescriptor_9188e3b7e55e1162 = []byte{ - // 575 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0x51, 0x6f, 0xd2, 0x50, - 0x18, 0x6d, 0x4b, 0xeb, 0xd6, 0x8f, 0x8d, 0x5c, 0xef, 0xf6, 0x40, 0x96, 0xa5, 0x21, 0xd5, 0x28, - 0x59, 0x0c, 0x61, 0x8c, 0xe8, 0x8c, 0xbe, 0x80, 0x30, 0x20, 0x42, 0x59, 0x0a, 0xd5, 0xc4, 0x07, - 0x9b, 0x42, 0x2f, 0xda, 0xa4, 0x70, 0x2b, 0xad, 0x0f, 0xdb, 0xaf, 0xf0, 0x1f, 0xf8, 0xec, 0x1f, - 0xd0, 0x7f, 0x60, 0x7c, 0xdc, 0xa3, 0x8f, 0x06, 0xfe, 0x88, 0xb9, 0x17, 0xc6, 0xe8, 0xe6, 0x1c, - 0x7b, 0xdb, 0xdb, 0x77, 0x6e, 0xcf, 0x3d, 0x3d, 0x39, 0xe7, 0xde, 0x0b, 0x30, 0xf0, 0x7c, 0x92, - 0x0b, 0xc6, 0x34, 0xa2, 0x78, 0xcd, 0x19, 0x9d, 0x44, 0x27, 0x01, 0xd1, 0x4b, 0xa0, 0x34, 0x86, - 0xce, 0x07, 0x82, 0x53, 0x20, 0x79, 0x6e, 0x5a, 0xcc, 0x88, 0x59, 0xd5, 0x94, 0x3c, 0x17, 0x67, - 0x41, 0x09, 0xbd, 0x53, 0x12, 0xa6, 0xa5, 0x4c, 0x22, 0x9b, 0x2a, 0xe0, 0xdc, 0x7c, 0x47, 0x8e, - 0xd3, 0x3b, 0xde, 0x29, 0x31, 0x67, 0x04, 0x26, 0xf1, 0xc6, 0x73, 0x09, 0x5d, 0x5d, 0x82, 0xd3, - 0x97, 0x25, 0x1e, 0x02, 0x6e, 0x04, 0x83, 0xb0, 0x46, 0xa2, 0x23, 0xcf, 0x27, 0x26, 0xf9, 0xf4, - 0x99, 0x84, 0xd1, 0x65, 0x3d, 0xfd, 0xa7, 0x04, 0x5b, 0x31, 0x5a, 0x18, 0xd0, 0x51, 0x48, 0xf0, - 0x21, 0x28, 0x64, 0x3c, 0xa6, 0x63, 0x4e, 0x4d, 0x16, 0xf4, 0x0b, 0xab, 0x57, 0xc9, 0xb9, 0x2a, - 0x63, 0x9a, 0xb3, 0x0d, 0x18, 0x83, 0xec, 0x3a, 0x91, 0x93, 0x96, 0x32, 0x62, 0x76, 0xc3, 0xe4, - 0x33, 0xde, 0x06, 0x65, 0x48, 0x5c, 0xcf, 0x49, 0x27, 0xf8, 0x8f, 0x67, 0x80, 0x31, 0x47, 0xce, - 0x90, 0xa4, 0x65, 0xbe, 0xc8, 0xe7, 0x9d, 0xef, 0x22, 0x28, 0x5c, 0x0e, 0xbf, 0x00, 0xb9, 0x4f, - 0x5d, 0xc2, 0x0d, 0xa4, 0x0a, 0x8f, 0x6f, 0x36, 0x90, 0x7b, 0x45, 0x5d, 0x62, 0xf2, 0x4d, 0x38, - 0x03, 0x49, 0x97, 0x84, 0xfd, 0xb1, 0x17, 0x44, 0x1e, 0x1d, 0x71, 0x2f, 0xaa, 0xb9, 0xbc, 0xa4, - 0x1b, 0x20, 0x33, 0x3e, 0x5e, 0x07, 0xd9, 0xb0, 0x9a, 0x4d, 0x24, 0xe0, 0xfb, 0xb0, 0x69, 0x19, - 0xaf, 0x8d, 0xf6, 0x5b, 0xc3, 0xae, 0x9a, 0x66, 0xdb, 0x44, 0x22, 0xde, 0x04, 0xb5, 0x5c, 0xaa, - 0xd8, 0x0d, 0xe3, 0xd8, 0xea, 0x22, 0x89, 0x41, 0xa3, 0xdd, 0xb5, 0x8f, 0xda, 0x96, 0x51, 0x41, - 0x04, 0x27, 0x61, 0xad, 0xdb, 0x68, 0x55, 0xdb, 0x56, 0x17, 0x0d, 0xf4, 0x16, 0x6c, 0xf1, 0x16, - 0x6b, 0x24, 0x2a, 0xfb, 0xb4, 0x77, 0x4d, 0xde, 0xf8, 0x11, 0xc8, 0xac, 0x1e, 0xee, 0xe8, 0xdf, - 0x27, 0x80, 0x7f, 0xd7, 0xbf, 0x4a, 0xb0, 0x1d, 0xd7, 0x9b, 0x17, 0xf3, 0x3c, 0x5e, 0xcc, 0x83, - 0xb8, 0xc2, 0x25, 0xf6, 0x95, 0x66, 0x7a, 0x3e, 0xed, 0x9d, 0x37, 0xc3, 0xe6, 0x9d, 0x1f, 0x8b, - 0xbc, 0x5f, 0xc6, 0xf2, 0xce, 0xae, 0xa0, 0x7b, 0x67, 0x02, 0xff, 0xcf, 0x01, 0x5f, 0x39, 0xf0, - 0x6f, 0x4b, 0x81, 0xc7, 0x6e, 0xc2, 0x8d, 0x81, 0x5f, 0x7f, 0x15, 0x76, 0x41, 0xf5, 0x69, 0xdf, - 0xf1, 0x8f, 0x9d, 0xe8, 0xe3, 0x3c, 0x92, 0x8b, 0x85, 0x5b, 0x44, 0x7f, 0xc7, 0xce, 0xfa, 0xde, - 0x13, 0x50, 0x17, 0xf1, 0x61, 0x15, 0x94, 0x66, 0xc9, 0xac, 0x55, 0x91, 0xc0, 0xc6, 0x4e, 0xab, - 0xd4, 0x6c, 0x22, 0x91, 0x8d, 0xdd, 0xba, 0xd5, 0x2a, 0x23, 0x69, 0xef, 0x3d, 0xa8, 0x8b, 0xc7, - 0x89, 0xe9, 0x74, 0x2a, 0xf6, 0xc1, 0xd3, 0x7c, 0x80, 0x84, 0x39, 0x28, 0x1e, 0xe6, 0x03, 0x24, - 0x32, 0x50, 0xaf, 0xd8, 0xcf, 0x0a, 0xf9, 0x00, 0x49, 0x78, 0x03, 0xd6, 0xeb, 0x15, 0x7b, 0x3f, - 0xcf, 0x3e, 0x25, 0x98, 0x17, 0x8b, 0xc1, 0x62, 0x31, 0x1f, 0x20, 0xf9, 0x1c, 0x16, 0xf6, 0x99, - 0x8a, 0x52, 0xde, 0xfd, 0x35, 0xd1, 0xc4, 0xb3, 0x89, 0x26, 0xfe, 0x99, 0x68, 0xe2, 0x97, 0xa9, - 0x26, 0x9c, 0x4d, 0x35, 0xe1, 0xf7, 0x54, 0x13, 0xde, 0x49, 0x41, 0xaf, 0x77, 0x8f, 0x3f, 0xce, - 0x07, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x6d, 0x0c, 0x55, 0xaa, 0x05, 0x00, 0x00, -} - -func (m *Image) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Image) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Image) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sizes) > 0 { - dAtA2 := make([]byte, len(m.Sizes)*10) - var j1 int - for _, num := range m.Sizes { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintFile(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintFile(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Video) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Video) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Video) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sizes) > 0 { - dAtA4 := make([]byte, len(m.Sizes)*10) - var j3 int - for _, num := range m.Sizes { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintFile(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintFile(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IpfsGetFileRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IpfsGetFileRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IpfsGetFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintFile(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IpfsGetFileResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IpfsGetFileResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IpfsGetFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintFile(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - } - if len(m.Media) > 0 { - i -= len(m.Media) - copy(dAtA[i:], m.Media) - i = encodeVarintFile(dAtA, i, uint64(len(m.Media))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintFile(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFile(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IpfsGetFileResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IpfsGetFileResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IpfsGetFileResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintFile(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ImageGetBlobRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageGetBlobRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageGetBlobRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Size_ != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Size_)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintFile(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ImageGetBlobResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageGetBlobResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageGetBlobResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Blob) > 0 { - i -= len(m.Blob) - copy(dAtA[i:], m.Blob) - i = encodeVarintFile(dAtA, i, uint64(len(m.Blob))) - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFile(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ImageGetBlobResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageGetBlobResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageGetBlobResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintFile(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ImageGetFileRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageGetFileRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageGetFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Size_ != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Size_)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintFile(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ImageGetFileResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageGetFileResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageGetFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LocalPath) > 0 { - i -= len(m.LocalPath) - copy(dAtA[i:], m.LocalPath) - i = encodeVarintFile(dAtA, i, uint64(len(m.LocalPath))) - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFile(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ImageGetFileResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageGetFileResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageGetFileResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintFile(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintFile(dAtA []byte, offset int, v uint64) int { - offset -= sovFile(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Image) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if len(m.Sizes) > 0 { - l = 0 - for _, e := range m.Sizes { - l += sovFile(uint64(e)) - } - n += 1 + sovFile(uint64(l)) + l - } - return n -} - -func (m *Video) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if len(m.Sizes) > 0 { - l = 0 - for _, e := range m.Sizes { - l += sovFile(uint64(e)) - } - n += 1 + sovFile(uint64(l)) + l - } - return n -} - -func (m *IpfsGetFileRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *IpfsGetFileResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Media) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *IpfsGetFileResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovFile(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *ImageGetBlobRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.Size_ != 0 { - n += 1 + sovFile(uint64(m.Size_)) - } - return n -} - -func (m *ImageGetBlobResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Blob) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *ImageGetBlobResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovFile(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *ImageGetFileRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.Size_ != 0 { - n += 1 + sovFile(uint64(m.Size_)) - } - return n -} - -func (m *ImageGetFileResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.LocalPath) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *ImageGetFileResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovFile(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func sovFile(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFile(x uint64) (n int) { - return sovFile(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Image) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Image: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType == 0 { - var v ImageSize - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= ImageSize(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sizes = append(m.Sizes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Sizes) == 0 { - m.Sizes = make([]ImageSize, 0, elementCount) - } - for iNdEx < postIndex { - var v ImageSize - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= ImageSize(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sizes = append(m.Sizes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Sizes", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Video) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Video: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Video: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType == 0 { - var v VideoSize - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= VideoSize(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sizes = append(m.Sizes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Sizes) == 0 { - m.Sizes = make([]VideoSize, 0, elementCount) - } - for iNdEx < postIndex { - var v VideoSize - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= VideoSize(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sizes = append(m.Sizes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Sizes", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IpfsGetFileRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IpfsGetFileRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IpfsGetFileRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IpfsGetFileResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IpfsGetFileResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IpfsGetFileResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &IpfsGetFileResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Media", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Media = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IpfsGetFileResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= IpfsGetFileResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageGetBlobRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageGetBlobRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageGetBlobRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - m.Size_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size_ |= ImageSize(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageGetBlobResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageGetBlobResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageGetBlobResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &ImageGetBlobResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Blob = append(m.Blob[:0], dAtA[iNdEx:postIndex]...) - if m.Blob == nil { - m.Blob = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageGetBlobResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ImageGetBlobResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageGetFileRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageGetFileRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageGetFileRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - m.Size_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size_ |= ImageSize(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageGetFileResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageGetFileResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageGetFileResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &ImageGetFileResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LocalPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageGetFileResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ImageGetFileResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFile(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFile - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFile - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFile - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFile - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFile - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFile - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFile = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFile = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFile = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pb/misc.pb.go b/pb/misc.pb.go deleted file mode 100644 index e45603ac6..000000000 --- a/pb/misc.pb.go +++ /dev/null @@ -1,2415 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: misc.proto - -package pb - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type VersionGetResponse_Error_Code int32 - -const ( - VersionGetResponse_Error_NULL VersionGetResponse_Error_Code = 0 - VersionGetResponse_Error_UNKNOWN_ERROR VersionGetResponse_Error_Code = 1 - VersionGetResponse_Error_BAD_INPUT VersionGetResponse_Error_Code = 2 - VersionGetResponse_Error_VERSION_IS_EMPTY VersionGetResponse_Error_Code = 3 - VersionGetResponse_Error_NOT_FOUND VersionGetResponse_Error_Code = 101 - VersionGetResponse_Error_TIMEOUT VersionGetResponse_Error_Code = 102 -) - -var VersionGetResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 3: "VERSION_IS_EMPTY", - 101: "NOT_FOUND", - 102: "TIMEOUT", -} - -var VersionGetResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "VERSION_IS_EMPTY": 3, - "NOT_FOUND": 101, - "TIMEOUT": 102, -} - -func (x VersionGetResponse_Error_Code) String() string { - return proto.EnumName(VersionGetResponse_Error_Code_name, int32(x)) -} - -func (VersionGetResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{1, 0, 0} -} - -type LogSendRequest_Level int32 - -const ( - LogSendRequest_DEBUG LogSendRequest_Level = 0 - LogSendRequest_ERROR LogSendRequest_Level = 1 - LogSendRequest_FATAL LogSendRequest_Level = 2 - LogSendRequest_INFO LogSendRequest_Level = 3 - LogSendRequest_PANIC LogSendRequest_Level = 4 - LogSendRequest_WARNING LogSendRequest_Level = 5 -) - -var LogSendRequest_Level_name = map[int32]string{ - 0: "DEBUG", - 1: "ERROR", - 2: "FATAL", - 3: "INFO", - 4: "PANIC", - 5: "WARNING", -} - -var LogSendRequest_Level_value = map[string]int32{ - "DEBUG": 0, - "ERROR": 1, - "FATAL": 2, - "INFO": 3, - "PANIC": 4, - "WARNING": 5, -} - -func (x LogSendRequest_Level) String() string { - return proto.EnumName(LogSendRequest_Level_name, int32(x)) -} - -func (LogSendRequest_Level) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{2, 0} -} - -type LogSendResponse_Error_Code int32 - -const ( - LogSendResponse_Error_NULL LogSendResponse_Error_Code = 0 - LogSendResponse_Error_UNKNOWN_ERROR LogSendResponse_Error_Code = 1 - LogSendResponse_Error_BAD_INPUT LogSendResponse_Error_Code = 2 - LogSendResponse_Error_NOT_FOUND LogSendResponse_Error_Code = 101 - LogSendResponse_Error_TIMEOUT LogSendResponse_Error_Code = 102 -) - -var LogSendResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 101: "NOT_FOUND", - 102: "TIMEOUT", -} - -var LogSendResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "NOT_FOUND": 101, - "TIMEOUT": 102, -} - -func (x LogSendResponse_Error_Code) String() string { - return proto.EnumName(LogSendResponse_Error_Code_name, int32(x)) -} - -func (LogSendResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{3, 0, 0} -} - -type LinkPreviewResponse_Type int32 - -const ( - LinkPreviewResponse_PAGE LinkPreviewResponse_Type = 0 - LinkPreviewResponse_IMAGE LinkPreviewResponse_Type = 1 - LinkPreviewResponse_TEXT LinkPreviewResponse_Type = 2 - LinkPreviewResponse_UNEXPECTED LinkPreviewResponse_Type = 3 -) - -var LinkPreviewResponse_Type_name = map[int32]string{ - 0: "PAGE", - 1: "IMAGE", - 2: "TEXT", - 3: "UNEXPECTED", -} - -var LinkPreviewResponse_Type_value = map[string]int32{ - "PAGE": 0, - "IMAGE": 1, - "TEXT": 2, - "UNEXPECTED": 3, -} - -func (x LinkPreviewResponse_Type) String() string { - return proto.EnumName(LinkPreviewResponse_Type_name, int32(x)) -} - -func (LinkPreviewResponse_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{5, 0} -} - -type LinkPreviewResponse_Error_Code int32 - -const ( - LinkPreviewResponse_Error_NULL LinkPreviewResponse_Error_Code = 0 - LinkPreviewResponse_Error_UNKNOWN_ERROR LinkPreviewResponse_Error_Code = 1 - LinkPreviewResponse_Error_BAD_INPUT LinkPreviewResponse_Error_Code = 2 - LinkPreviewResponse_Error_TIMEOUT LinkPreviewResponse_Error_Code = 102 -) - -var LinkPreviewResponse_Error_Code_name = map[int32]string{ - 0: "NULL", - 1: "UNKNOWN_ERROR", - 2: "BAD_INPUT", - 102: "TIMEOUT", -} - -var LinkPreviewResponse_Error_Code_value = map[string]int32{ - "NULL": 0, - "UNKNOWN_ERROR": 1, - "BAD_INPUT": 2, - "TIMEOUT": 102, -} - -func (x LinkPreviewResponse_Error_Code) String() string { - return proto.EnumName(LinkPreviewResponse_Error_Code_name, int32(x)) -} - -func (LinkPreviewResponse_Error_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{5, 0, 0} -} - -type VersionGetRequest struct { -} - -func (m *VersionGetRequest) Reset() { *m = VersionGetRequest{} } -func (m *VersionGetRequest) String() string { return proto.CompactTextString(m) } -func (*VersionGetRequest) ProtoMessage() {} -func (*VersionGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{0} -} -func (m *VersionGetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VersionGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VersionGetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VersionGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VersionGetRequest.Merge(m, src) -} -func (m *VersionGetRequest) XXX_Size() int { - return m.Size() -} -func (m *VersionGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VersionGetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VersionGetRequest proto.InternalMessageInfo - -type VersionGetResponse struct { - Error *VersionGetResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - // version is generate by git describe - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` -} - -func (m *VersionGetResponse) Reset() { *m = VersionGetResponse{} } -func (m *VersionGetResponse) String() string { return proto.CompactTextString(m) } -func (*VersionGetResponse) ProtoMessage() {} -func (*VersionGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{1} -} -func (m *VersionGetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VersionGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VersionGetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VersionGetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VersionGetResponse.Merge(m, src) -} -func (m *VersionGetResponse) XXX_Size() int { - return m.Size() -} -func (m *VersionGetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VersionGetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VersionGetResponse proto.InternalMessageInfo - -func (m *VersionGetResponse) GetError() *VersionGetResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *VersionGetResponse) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *VersionGetResponse) GetDetails() string { - if m != nil { - return m.Details - } - return "" -} - -type VersionGetResponse_Error struct { - Code VersionGetResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.VersionGetResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *VersionGetResponse_Error) Reset() { *m = VersionGetResponse_Error{} } -func (m *VersionGetResponse_Error) String() string { return proto.CompactTextString(m) } -func (*VersionGetResponse_Error) ProtoMessage() {} -func (*VersionGetResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{1, 0} -} -func (m *VersionGetResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VersionGetResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VersionGetResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VersionGetResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_VersionGetResponse_Error.Merge(m, src) -} -func (m *VersionGetResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *VersionGetResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_VersionGetResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_VersionGetResponse_Error proto.InternalMessageInfo - -func (m *VersionGetResponse_Error) GetCode() VersionGetResponse_Error_Code { - if m != nil { - return m.Code - } - return VersionGetResponse_Error_NULL -} - -func (m *VersionGetResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type LogSendRequest struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - Level LogSendRequest_Level `protobuf:"varint,2,opt,name=level,proto3,enum=anytype.LogSendRequest_Level" json:"level,omitempty"` -} - -func (m *LogSendRequest) Reset() { *m = LogSendRequest{} } -func (m *LogSendRequest) String() string { return proto.CompactTextString(m) } -func (*LogSendRequest) ProtoMessage() {} -func (*LogSendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{2} -} -func (m *LogSendRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogSendRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogSendRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSendRequest.Merge(m, src) -} -func (m *LogSendRequest) XXX_Size() int { - return m.Size() -} -func (m *LogSendRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogSendRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LogSendRequest proto.InternalMessageInfo - -func (m *LogSendRequest) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *LogSendRequest) GetLevel() LogSendRequest_Level { - if m != nil { - return m.Level - } - return LogSendRequest_DEBUG -} - -type LogSendResponse struct { - Error *LogSendResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *LogSendResponse) Reset() { *m = LogSendResponse{} } -func (m *LogSendResponse) String() string { return proto.CompactTextString(m) } -func (*LogSendResponse) ProtoMessage() {} -func (*LogSendResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{3} -} -func (m *LogSendResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogSendResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogSendResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSendResponse.Merge(m, src) -} -func (m *LogSendResponse) XXX_Size() int { - return m.Size() -} -func (m *LogSendResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogSendResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LogSendResponse proto.InternalMessageInfo - -func (m *LogSendResponse) GetError() *LogSendResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -type LogSendResponse_Error struct { - Code LogSendResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.LogSendResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *LogSendResponse_Error) Reset() { *m = LogSendResponse_Error{} } -func (m *LogSendResponse_Error) String() string { return proto.CompactTextString(m) } -func (*LogSendResponse_Error) ProtoMessage() {} -func (*LogSendResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{3, 0} -} -func (m *LogSendResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogSendResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogSendResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogSendResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSendResponse_Error.Merge(m, src) -} -func (m *LogSendResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *LogSendResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_LogSendResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_LogSendResponse_Error proto.InternalMessageInfo - -func (m *LogSendResponse_Error) GetCode() LogSendResponse_Error_Code { - if m != nil { - return m.Code - } - return LogSendResponse_Error_NULL -} - -func (m *LogSendResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type LinkPreviewRequest struct { - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (m *LinkPreviewRequest) Reset() { *m = LinkPreviewRequest{} } -func (m *LinkPreviewRequest) String() string { return proto.CompactTextString(m) } -func (*LinkPreviewRequest) ProtoMessage() {} -func (*LinkPreviewRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{4} -} -func (m *LinkPreviewRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LinkPreviewRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LinkPreviewRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LinkPreviewRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinkPreviewRequest.Merge(m, src) -} -func (m *LinkPreviewRequest) XXX_Size() int { - return m.Size() -} -func (m *LinkPreviewRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LinkPreviewRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LinkPreviewRequest proto.InternalMessageInfo - -func (m *LinkPreviewRequest) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -type LinkPreviewResponse struct { - Error *LinkPreviewResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,4,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` - Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` - FaviconUrl string `protobuf:"bytes,6,opt,name=faviconUrl,proto3" json:"faviconUrl,omitempty"` - Type LinkPreviewResponse_Type `protobuf:"varint,7,opt,name=type,proto3,enum=anytype.LinkPreviewResponse_Type" json:"type,omitempty"` -} - -func (m *LinkPreviewResponse) Reset() { *m = LinkPreviewResponse{} } -func (m *LinkPreviewResponse) String() string { return proto.CompactTextString(m) } -func (*LinkPreviewResponse) ProtoMessage() {} -func (*LinkPreviewResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{5} -} -func (m *LinkPreviewResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LinkPreviewResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LinkPreviewResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LinkPreviewResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinkPreviewResponse.Merge(m, src) -} -func (m *LinkPreviewResponse) XXX_Size() int { - return m.Size() -} -func (m *LinkPreviewResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LinkPreviewResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LinkPreviewResponse proto.InternalMessageInfo - -func (m *LinkPreviewResponse) GetError() *LinkPreviewResponse_Error { - if m != nil { - return m.Error - } - return nil -} - -func (m *LinkPreviewResponse) GetTitle() string { - if m != nil { - return m.Title - } - return "" -} - -func (m *LinkPreviewResponse) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *LinkPreviewResponse) GetImageUrl() string { - if m != nil { - return m.ImageUrl - } - return "" -} - -func (m *LinkPreviewResponse) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *LinkPreviewResponse) GetFaviconUrl() string { - if m != nil { - return m.FaviconUrl - } - return "" -} - -func (m *LinkPreviewResponse) GetType() LinkPreviewResponse_Type { - if m != nil { - return m.Type - } - return LinkPreviewResponse_PAGE -} - -type LinkPreviewResponse_Error struct { - Code LinkPreviewResponse_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.LinkPreviewResponse_Error_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *LinkPreviewResponse_Error) Reset() { *m = LinkPreviewResponse_Error{} } -func (m *LinkPreviewResponse_Error) String() string { return proto.CompactTextString(m) } -func (*LinkPreviewResponse_Error) ProtoMessage() {} -func (*LinkPreviewResponse_Error) Descriptor() ([]byte, []int) { - return fileDescriptor_2d3ba2f07ad357c5, []int{5, 0} -} -func (m *LinkPreviewResponse_Error) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LinkPreviewResponse_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LinkPreviewResponse_Error.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LinkPreviewResponse_Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinkPreviewResponse_Error.Merge(m, src) -} -func (m *LinkPreviewResponse_Error) XXX_Size() int { - return m.Size() -} -func (m *LinkPreviewResponse_Error) XXX_DiscardUnknown() { - xxx_messageInfo_LinkPreviewResponse_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_LinkPreviewResponse_Error proto.InternalMessageInfo - -func (m *LinkPreviewResponse_Error) GetCode() LinkPreviewResponse_Error_Code { - if m != nil { - return m.Code - } - return LinkPreviewResponse_Error_NULL -} - -func (m *LinkPreviewResponse_Error) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func init() { - proto.RegisterEnum("anytype.VersionGetResponse_Error_Code", VersionGetResponse_Error_Code_name, VersionGetResponse_Error_Code_value) - proto.RegisterEnum("anytype.LogSendRequest_Level", LogSendRequest_Level_name, LogSendRequest_Level_value) - proto.RegisterEnum("anytype.LogSendResponse_Error_Code", LogSendResponse_Error_Code_name, LogSendResponse_Error_Code_value) - proto.RegisterEnum("anytype.LinkPreviewResponse_Type", LinkPreviewResponse_Type_name, LinkPreviewResponse_Type_value) - proto.RegisterEnum("anytype.LinkPreviewResponse_Error_Code", LinkPreviewResponse_Error_Code_name, LinkPreviewResponse_Error_Code_value) - proto.RegisterType((*VersionGetRequest)(nil), "anytype.VersionGetRequest") - proto.RegisterType((*VersionGetResponse)(nil), "anytype.VersionGetResponse") - proto.RegisterType((*VersionGetResponse_Error)(nil), "anytype.VersionGetResponse.Error") - proto.RegisterType((*LogSendRequest)(nil), "anytype.LogSendRequest") - proto.RegisterType((*LogSendResponse)(nil), "anytype.LogSendResponse") - proto.RegisterType((*LogSendResponse_Error)(nil), "anytype.LogSendResponse.Error") - proto.RegisterType((*LinkPreviewRequest)(nil), "anytype.LinkPreviewRequest") - proto.RegisterType((*LinkPreviewResponse)(nil), "anytype.LinkPreviewResponse") - proto.RegisterType((*LinkPreviewResponse_Error)(nil), "anytype.LinkPreviewResponse.Error") -} - -func init() { proto.RegisterFile("misc.proto", fileDescriptor_2d3ba2f07ad357c5) } - -var fileDescriptor_2d3ba2f07ad357c5 = []byte{ - // 631 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x4e, 0xdb, 0x4c, - 0x14, 0x85, 0xe3, 0xd8, 0x26, 0xe4, 0x22, 0xf2, 0x0f, 0x03, 0x8b, 0x28, 0xfa, 0x6b, 0x81, 0x2b, - 0x51, 0x56, 0x59, 0x40, 0x11, 0x55, 0xbb, 0xa8, 0x02, 0x31, 0x91, 0xdb, 0x30, 0x8e, 0x06, 0x1b, - 0x68, 0x37, 0x51, 0x88, 0x07, 0x64, 0xd5, 0xd8, 0xae, 0x6d, 0x52, 0xf1, 0x16, 0x7d, 0x8b, 0x2e, - 0xba, 0xeb, 0x53, 0x54, 0xea, 0xa2, 0x2c, 0xbb, 0xac, 0x60, 0xdd, 0x37, 0xe8, 0xa2, 0x1a, 0xdb, - 0x31, 0xb8, 0xa9, 0x82, 0x60, 0x37, 0xf7, 0xce, 0x99, 0x99, 0x73, 0xee, 0x27, 0x1b, 0xe0, 0xcc, - 0x89, 0x86, 0xcd, 0x20, 0xf4, 0x63, 0x1f, 0x57, 0x06, 0xde, 0x45, 0x7c, 0x11, 0x30, 0x75, 0x11, - 0x16, 0x0e, 0x58, 0x18, 0x39, 0xbe, 0xd7, 0x61, 0x31, 0x65, 0xef, 0xcf, 0x59, 0x14, 0xab, 0xdf, - 0xcb, 0x80, 0x6f, 0x77, 0xa3, 0xc0, 0xf7, 0x22, 0x86, 0xb7, 0x40, 0x66, 0x61, 0xe8, 0x87, 0x75, - 0x61, 0x59, 0x58, 0x9b, 0x5b, 0x5f, 0x69, 0x66, 0x97, 0x34, 0x27, 0xb5, 0x4d, 0x8d, 0x0b, 0x69, - 0xaa, 0xc7, 0x75, 0xa8, 0x8c, 0x52, 0x49, 0xbd, 0xbc, 0x2c, 0xac, 0x55, 0xe9, 0xb8, 0xe4, 0x3b, - 0x36, 0x8b, 0x07, 0x8e, 0x1b, 0xd5, 0xc5, 0x74, 0x27, 0x2b, 0x1b, 0xdf, 0x04, 0x90, 0x93, 0x4b, - 0xf0, 0x73, 0x90, 0x86, 0xbe, 0xcd, 0x92, 0x57, 0x6b, 0xeb, 0xab, 0x77, 0xbe, 0xda, 0xdc, 0xf1, - 0x6d, 0x46, 0x93, 0x33, 0x78, 0x19, 0xe6, 0x6c, 0x16, 0x0d, 0x43, 0x27, 0x88, 0x6f, 0x5e, 0xbf, - 0xdd, 0x52, 0x6d, 0x90, 0xb8, 0x1e, 0xcf, 0x82, 0x44, 0xac, 0x6e, 0x17, 0x95, 0xf0, 0x02, 0xcc, - 0x5b, 0xe4, 0x35, 0x31, 0x0e, 0x49, 0x5f, 0xa3, 0xd4, 0xa0, 0x48, 0xc0, 0xf3, 0x50, 0xdd, 0x6e, - 0xb5, 0xfb, 0x3a, 0xe9, 0x59, 0x26, 0x2a, 0xe3, 0x25, 0x40, 0x07, 0x1a, 0xdd, 0xd7, 0x0d, 0xd2, - 0xd7, 0xf7, 0xfb, 0xda, 0x5e, 0xcf, 0x7c, 0x83, 0x44, 0x2e, 0x22, 0x86, 0xd9, 0xdf, 0x35, 0x2c, - 0xd2, 0x46, 0x0c, 0xcf, 0x41, 0xc5, 0xd4, 0xf7, 0x34, 0xc3, 0x32, 0xd1, 0x89, 0xfa, 0x59, 0x80, - 0x5a, 0xd7, 0x3f, 0xdd, 0x67, 0x9e, 0x9d, 0x0d, 0x99, 0x47, 0x3f, 0x63, 0x51, 0x34, 0x38, 0x4d, - 0x93, 0x55, 0xe9, 0xb8, 0xc4, 0x1b, 0x20, 0xbb, 0x6c, 0xc4, 0xdc, 0xc4, 0x6e, 0x6d, 0xfd, 0x51, - 0x9e, 0xb8, 0x78, 0x43, 0xb3, 0xcb, 0x45, 0x34, 0xd5, 0xaa, 0xaf, 0x40, 0x4e, 0x6a, 0x5c, 0x05, - 0xb9, 0xad, 0x6d, 0x5b, 0x1d, 0x54, 0xe2, 0xcb, 0x71, 0x82, 0x2a, 0xc8, 0xbb, 0x2d, 0xb3, 0xd5, - 0x45, 0x65, 0x9e, 0x54, 0x27, 0xbb, 0x06, 0x12, 0x79, 0xb3, 0xd7, 0x22, 0xfa, 0x0e, 0x92, 0xb8, - 0xdb, 0xc3, 0x16, 0x25, 0x3a, 0xe9, 0x20, 0x59, 0xfd, 0x2d, 0xc0, 0x7f, 0xf9, 0x5b, 0x19, 0xfc, - 0xa7, 0x45, 0xf8, 0xca, 0xa4, 0xa9, 0x7f, 0x90, 0x6f, 0x7c, 0xc9, 0x29, 0x6e, 0x15, 0x28, 0x3e, - 0x9e, 0x7e, 0xfc, 0x7e, 0x08, 0xc9, 0x03, 0x10, 0x4e, 0x83, 0xb5, 0x0a, 0xb8, 0xeb, 0x78, 0xef, - 0x7a, 0x21, 0x1b, 0x39, 0xec, 0xc3, 0x98, 0x17, 0x02, 0xf1, 0x3c, 0x74, 0x33, 0x56, 0x7c, 0xa9, - 0xfe, 0x12, 0x61, 0xb1, 0x20, 0xcc, 0x46, 0xf5, 0xac, 0x38, 0x2a, 0xf5, 0x26, 0xeb, 0xa4, 0xb8, - 0xf8, 0xa1, 0x2c, 0x81, 0x1c, 0x3b, 0xb1, 0xcb, 0xb2, 0x94, 0x69, 0xf1, 0xf7, 0x04, 0xc4, 0x89, - 0x09, 0xe0, 0x06, 0xcc, 0x3a, 0x67, 0x83, 0x53, 0x66, 0x85, 0x6e, 0x5d, 0x4a, 0xb6, 0xf3, 0x7a, - 0xec, 0x5b, 0xce, 0x7d, 0x63, 0x05, 0xe0, 0x64, 0x30, 0x72, 0x86, 0xbe, 0xc7, 0xf5, 0x33, 0xc9, - 0xc6, 0xad, 0x0e, 0xde, 0x04, 0x89, 0xdb, 0xad, 0x57, 0x12, 0x54, 0x2b, 0x53, 0xed, 0x9b, 0x17, - 0x01, 0xa3, 0x89, 0xbc, 0xf1, 0x29, 0x67, 0xfd, 0xa2, 0xc0, 0xfa, 0xc9, 0xdd, 0xf9, 0xef, 0xc7, - 0xfb, 0xe5, 0x03, 0x78, 0x17, 0x00, 0x6f, 0x82, 0xc4, 0x7d, 0xf3, 0x0b, 0x7a, 0xad, 0x8e, 0x96, - 0x7e, 0x29, 0xfa, 0x1e, 0x5f, 0x0a, 0xbc, 0x69, 0x6a, 0x47, 0xfc, 0x4c, 0x0d, 0xc0, 0x22, 0xda, - 0x51, 0x4f, 0xdb, 0x31, 0xb5, 0x36, 0x12, 0xb7, 0xff, 0xff, 0x7a, 0xa5, 0x08, 0x97, 0x57, 0x8a, - 0xf0, 0xf3, 0x4a, 0x11, 0x3e, 0x5e, 0x2b, 0xa5, 0xcb, 0x6b, 0xa5, 0xf4, 0xe3, 0x5a, 0x29, 0xbd, - 0x2d, 0x07, 0xc7, 0xc7, 0x33, 0xc9, 0x9f, 0x75, 0xe3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, - 0x91, 0xa6, 0xa6, 0x67, 0x05, 0x00, 0x00, -} - -func (m *VersionGetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VersionGetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VersionGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *VersionGetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VersionGetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VersionGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Details) > 0 { - i -= len(m.Details) - copy(dAtA[i:], m.Details) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Details))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMisc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VersionGetResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VersionGetResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VersionGetResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintMisc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LogSendRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogSendRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSendRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Level != 0 { - i = encodeVarintMisc(dAtA, i, uint64(m.Level)) - i-- - dAtA[i] = 0x10 - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogSendResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogSendResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMisc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogSendResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogSendResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSendResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintMisc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LinkPreviewRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LinkPreviewRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LinkPreviewRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LinkPreviewResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LinkPreviewResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LinkPreviewResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Type != 0 { - i = encodeVarintMisc(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x38 - } - if len(m.FaviconUrl) > 0 { - i -= len(m.FaviconUrl) - copy(dAtA[i:], m.FaviconUrl) - i = encodeVarintMisc(dAtA, i, uint64(len(m.FaviconUrl))) - i-- - dAtA[i] = 0x32 - } - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0x2a - } - if len(m.ImageUrl) > 0 { - i -= len(m.ImageUrl) - copy(dAtA[i:], m.ImageUrl) - i = encodeVarintMisc(dAtA, i, uint64(len(m.ImageUrl))) - i-- - dAtA[i] = 0x22 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0x12 - } - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMisc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LinkPreviewResponse_Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LinkPreviewResponse_Error) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LinkPreviewResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMisc(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintMisc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintMisc(dAtA []byte, offset int, v uint64) int { - offset -= sovMisc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VersionGetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *VersionGetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.Details) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - return n -} - -func (m *VersionGetResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovMisc(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - return n -} - -func (m *LogSendRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - if m.Level != 0 { - n += 1 + sovMisc(uint64(m.Level)) - } - return n -} - -func (m *LogSendResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovMisc(uint64(l)) - } - return n -} - -func (m *LogSendResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovMisc(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - return n -} - -func (m *LinkPreviewRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Url) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - return n -} - -func (m *LinkPreviewResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.ImageUrl) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - l = len(m.FaviconUrl) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovMisc(uint64(m.Type)) - } - return n -} - -func (m *LinkPreviewResponse_Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovMisc(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMisc(uint64(l)) - } - return n -} - -func sovMisc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMisc(x uint64) (n int) { - return sovMisc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VersionGetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VersionGetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VersionGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VersionGetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VersionGetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VersionGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &VersionGetResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Details = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VersionGetResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= VersionGetResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogSendRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogSendRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogSendRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - m.Level = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Level |= LogSendRequest_Level(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogSendResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogSendResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &LogSendResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogSendResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= LogSendResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LinkPreviewRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LinkPreviewRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LinkPreviewRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LinkPreviewResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LinkPreviewResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LinkPreviewResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &LinkPreviewResponse_Error{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FaviconUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FaviconUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= LinkPreviewResponse_Type(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LinkPreviewResponse_Error) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= LinkPreviewResponse_Error_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMisc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMisc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMisc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMisc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMisc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMisc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMisc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMisc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMisc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMisc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMisc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMisc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMisc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMisc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMisc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pb/models.pb.go b/pb/models.pb.go new file mode 100644 index 000000000..d612140a0 --- /dev/null +++ b/pb/models.pb.go @@ -0,0 +1,8187 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: models.proto + +package pb + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ModelBlockHeaderType int32 + +const ( + ModelBlockHeader_DASHBOARD ModelBlockHeaderType = 0 + ModelBlockHeader_PAGE ModelBlockHeaderType = 1 + ModelBlockHeader_DATAVIEW ModelBlockHeaderType = 2 + ModelBlockHeader_TEXT ModelBlockHeaderType = 3 + ModelBlockHeader_FILE ModelBlockHeaderType = 4 + ModelBlockHeader_PICTURE ModelBlockHeaderType = 5 + ModelBlockHeader_VIDEO ModelBlockHeaderType = 6 + ModelBlockHeader_BOOKMARK ModelBlockHeaderType = 7 + ModelBlockHeader_LAYOUT ModelBlockHeaderType = 8 + ModelBlockHeader_DIV ModelBlockHeaderType = 9 +) + +var ModelBlockHeaderType_name = map[int32]string{ + 0: "DASHBOARD", + 1: "PAGE", + 2: "DATAVIEW", + 3: "TEXT", + 4: "FILE", + 5: "PICTURE", + 6: "VIDEO", + 7: "BOOKMARK", + 8: "LAYOUT", + 9: "DIV", +} + +var ModelBlockHeaderType_value = map[string]int32{ + "DASHBOARD": 0, + "PAGE": 1, + "DATAVIEW": 2, + "TEXT": 3, + "FILE": 4, + "PICTURE": 5, + "VIDEO": 6, + "BOOKMARK": 7, + "LAYOUT": 8, + "DIV": 9, +} + +func (x ModelBlockHeaderType) String() string { + return proto.EnumName(ModelBlockHeaderType_name, int32(x)) +} + +func (ModelBlockHeaderType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 0, 0} +} + +type ModelBlockContentLayoutStyle int32 + +const ( + ModelBlockContentLayout_ROW ModelBlockContentLayoutStyle = 0 + ModelBlockContentLayout_COLUMN ModelBlockContentLayoutStyle = 1 +) + +var ModelBlockContentLayoutStyle_name = map[int32]string{ + 0: "ROW", + 1: "COLUMN", +} + +var ModelBlockContentLayoutStyle_value = map[string]int32{ + "ROW": 0, + "COLUMN": 1, +} + +func (x ModelBlockContentLayoutStyle) String() string { + return proto.EnumName(ModelBlockContentLayoutStyle_name, int32(x)) +} + +func (ModelBlockContentLayoutStyle) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 0, 0} +} + +type ModelBlockContentDashboardStyle int32 + +const ( + ModelBlockContentDashboard_MAIN_SCREEN ModelBlockContentDashboardStyle = 0 +) + +var ModelBlockContentDashboardStyle_name = map[int32]string{ + 0: "MAIN_SCREEN", +} + +var ModelBlockContentDashboardStyle_value = map[string]int32{ + "MAIN_SCREEN": 0, +} + +func (x ModelBlockContentDashboardStyle) String() string { + return proto.EnumName(ModelBlockContentDashboardStyle_name, int32(x)) +} + +func (ModelBlockContentDashboardStyle) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 2, 0} +} + +type ModelBlockContentTextStyle int32 + +const ( + ModelBlockContentText_p ModelBlockContentTextStyle = 0 + ModelBlockContentText_h1 ModelBlockContentTextStyle = 1 + ModelBlockContentText_h2 ModelBlockContentTextStyle = 2 + ModelBlockContentText_h3 ModelBlockContentTextStyle = 3 + ModelBlockContentText_h4 ModelBlockContentTextStyle = 4 + ModelBlockContentText_quote ModelBlockContentTextStyle = 5 + ModelBlockContentText_code ModelBlockContentTextStyle = 6 +) + +var ModelBlockContentTextStyle_name = map[int32]string{ + 0: "p", + 1: "h1", + 2: "h2", + 3: "h3", + 4: "h4", + 5: "quote", + 6: "code", +} + +var ModelBlockContentTextStyle_value = map[string]int32{ + "p": 0, + "h1": 1, + "h2": 2, + "h3": 3, + "h4": 4, + "quote": 5, + "code": 6, +} + +func (x ModelBlockContentTextStyle) String() string { + return proto.EnumName(ModelBlockContentTextStyle_name, int32(x)) +} + +func (ModelBlockContentTextStyle) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 4, 0} +} + +type ModelBlockContentTextMarkerType int32 + +const ( + ModelBlockContentText_none ModelBlockContentTextMarkerType = 0 + ModelBlockContentText_number ModelBlockContentTextMarkerType = 1 + ModelBlockContentText_bullet ModelBlockContentTextMarkerType = 2 +) + +var ModelBlockContentTextMarkerType_name = map[int32]string{ + 0: "none", + 1: "number", + 2: "bullet", +} + +var ModelBlockContentTextMarkerType_value = map[string]int32{ + "none": 0, + "number": 1, + "bullet": 2, +} + +func (x ModelBlockContentTextMarkerType) String() string { + return proto.EnumName(ModelBlockContentTextMarkerType_name, int32(x)) +} + +func (ModelBlockContentTextMarkerType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 4, 1} +} + +type ModelBlockContentTextMarkType int32 + +const ( + ModelBlockContentTextMark_STRIKETHROUGH ModelBlockContentTextMarkType = 0 + ModelBlockContentTextMark_KEYBOARD ModelBlockContentTextMarkType = 1 + ModelBlockContentTextMark_ITALIC ModelBlockContentTextMarkType = 2 + ModelBlockContentTextMark_BOLD ModelBlockContentTextMarkType = 3 + ModelBlockContentTextMark_LINK ModelBlockContentTextMarkType = 4 +) + +var ModelBlockContentTextMarkType_name = map[int32]string{ + 0: "STRIKETHROUGH", + 1: "KEYBOARD", + 2: "ITALIC", + 3: "BOLD", + 4: "LINK", +} + +var ModelBlockContentTextMarkType_value = map[string]int32{ + "STRIKETHROUGH": 0, + "KEYBOARD": 1, + "ITALIC": 2, + "BOLD": 3, + "LINK": 4, +} + +func (x ModelBlockContentTextMarkType) String() string { + return proto.EnumName(ModelBlockContentTextMarkType_name, int32(x)) +} + +func (ModelBlockContentTextMarkType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 4, 1, 0} +} + +type ModelBlockContentMediaState int32 + +const ( + ModelBlockContentMedia_EMPTY ModelBlockContentMediaState = 0 + ModelBlockContentMedia_UPLOADING ModelBlockContentMediaState = 1 + ModelBlockContentMedia_PREVIEW ModelBlockContentMediaState = 2 + ModelBlockContentMedia_DOWNLOADING ModelBlockContentMediaState = 3 + ModelBlockContentMedia_DONE ModelBlockContentMediaState = 4 +) + +var ModelBlockContentMediaState_name = map[int32]string{ + 0: "EMPTY", + 1: "UPLOADING", + 2: "PREVIEW", + 3: "DOWNLOADING", + 4: "DONE", +} + +var ModelBlockContentMediaState_value = map[string]int32{ + "EMPTY": 0, + "UPLOADING": 1, + "PREVIEW": 2, + "DOWNLOADING": 3, + "DONE": 4, +} + +func (x ModelBlockContentMediaState) String() string { + return proto.EnumName(ModelBlockContentMediaState_name, int32(x)) +} + +func (ModelBlockContentMediaState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 5, 0} +} + +type ModelBlockContentPageStyle int32 + +const ( + ModelBlockContentPage_EMPTY ModelBlockContentPageStyle = 0 + ModelBlockContentPage_TASK ModelBlockContentPageStyle = 1 + ModelBlockContentPage_BOOKMARK ModelBlockContentPageStyle = 2 + ModelBlockContentPage_SET ModelBlockContentPageStyle = 3 +) + +var ModelBlockContentPageStyle_name = map[int32]string{ + 0: "EMPTY", + 1: "TASK", + 2: "BOOKMARK", + 3: "SET", +} + +var ModelBlockContentPageStyle_value = map[string]int32{ + "EMPTY": 0, + "TASK": 1, + "BOOKMARK": 2, + "SET": 3, +} + +func (x ModelBlockContentPageStyle) String() string { + return proto.EnumName(ModelBlockContentPageStyle_name, int32(x)) +} + +func (ModelBlockContentPageStyle) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 6, 0} +} + +// `NullValue` is a singleton enumeration to represent the null value for the +type ModelStructNullValue int32 + +const ( + ModelStruct_NULL_VALUE ModelStructNullValue = 0 +) + +var ModelStructNullValue_name = map[int32]string{ + 0: "NULL_VALUE", +} + +var ModelStructNullValue_value = map[string]int32{ + "NULL_VALUE": 0, +} + +func (x ModelStructNullValue) String() string { + return proto.EnumName(ModelStructNullValue_name, int32(x)) +} + +func (ModelStructNullValue) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 2, 0} +} + +type ModelImageSize int32 + +const ( + ModelImage_LARGE ModelImageSize = 0 + ModelImage_SMALL ModelImageSize = 1 + ModelImage_THUMB ModelImageSize = 2 +) + +var ModelImageSize_name = map[int32]string{ + 0: "LARGE", + 1: "SMALL", + 2: "THUMB", +} + +var ModelImageSize_value = map[string]int32{ + "LARGE": 0, + "SMALL": 1, + "THUMB": 2, +} + +func (x ModelImageSize) String() string { + return proto.EnumName(ModelImageSize_name, int32(x)) +} + +func (ModelImageSize) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 4, 0} +} + +type ModelVideoSize int32 + +const ( + ModelVideo_SD_360p ModelVideoSize = 0 + ModelVideo_SD_480p ModelVideoSize = 1 + ModelVideo_HD_720p ModelVideoSize = 2 + ModelVideo_HD_1080p ModelVideoSize = 3 + ModelVideo_UHD_1440p ModelVideoSize = 4 + ModelVideo_UHD_2160p ModelVideoSize = 5 +) + +var ModelVideoSize_name = map[int32]string{ + 0: "SD_360p", + 1: "SD_480p", + 2: "HD_720p", + 3: "HD_1080p", + 4: "UHD_1440p", + 5: "UHD_2160p", +} + +var ModelVideoSize_value = map[string]int32{ + "SD_360p": 0, + "SD_480p": 1, + "HD_720p": 2, + "HD_1080p": 3, + "UHD_1440p": 4, + "UHD_2160p": 5, +} + +func (x ModelVideoSize) String() string { + return proto.EnumName(ModelVideoSize_name, int32(x)) +} + +func (ModelVideoSize) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 5, 0} +} + +type ModelPreviewLinkType int32 + +const ( + ModelPreviewLink_PAGE ModelPreviewLinkType = 0 + ModelPreviewLink_IMAGE ModelPreviewLinkType = 1 + ModelPreviewLink_TEXT ModelPreviewLinkType = 2 + ModelPreviewLink_UNEXPECTED ModelPreviewLinkType = 3 +) + +var ModelPreviewLinkType_name = map[int32]string{ + 0: "PAGE", + 1: "IMAGE", + 2: "TEXT", + 3: "UNEXPECTED", +} + +var ModelPreviewLinkType_value = map[string]int32{ + "PAGE": 0, + "IMAGE": 1, + "TEXT": 2, + "UNEXPECTED": 3, +} + +func (x ModelPreviewLinkType) String() string { + return proto.EnumName(ModelPreviewLinkType_name, int32(x)) +} + +func (ModelPreviewLinkType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 6, 0, 0} +} + +type Model struct { +} + +func (m *Model) Reset() { *m = Model{} } +func (m *Model) String() string { return proto.CompactTextString(m) } +func (*Model) ProtoMessage() {} +func (*Model) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0} +} +func (m *Model) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Model.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Model) XXX_Merge(src proto.Message) { + xxx_messageInfo_Model.Merge(m, src) +} +func (m *Model) XXX_Size() int { + return m.Size() +} +func (m *Model) XXX_DiscardUnknown() { + xxx_messageInfo_Model.DiscardUnknown(m) +} + +var xxx_messageInfo_Model proto.InternalMessageInfo + +type ModelBlock struct { + Header *ModelBlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Children []string `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` + // Types that are valid to be assigned to Content: + // *ModelBlockContentOfDashboard + // *ModelBlockContentOfPage + // *ModelBlockContentOfDataview + // *ModelBlockContentOfText + // *ModelBlockContentOfMedia + // *ModelBlockContentOfLayout + // *ModelBlockContentOfDiv + Content isModelBlockContent `protobuf_oneof:"content"` +} + +func (m *ModelBlock) Reset() { *m = ModelBlock{} } +func (m *ModelBlock) String() string { return proto.CompactTextString(m) } +func (*ModelBlock) ProtoMessage() {} +func (*ModelBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0} +} +func (m *ModelBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlock.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlock.Merge(m, src) +} +func (m *ModelBlock) XXX_Size() int { + return m.Size() +} +func (m *ModelBlock) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlock proto.InternalMessageInfo + +type isModelBlockContent interface { + isModelBlockContent() + MarshalTo([]byte) (int, error) + Size() int +} + +type ModelBlockContentOfDashboard struct { + Dashboard *ModelBlockContentDashboard `protobuf:"bytes,11,opt,name=dashboard,proto3,oneof" json:"dashboard,omitempty"` +} +type ModelBlockContentOfPage struct { + Page *ModelBlockContentPage `protobuf:"bytes,12,opt,name=page,proto3,oneof" json:"page,omitempty"` +} +type ModelBlockContentOfDataview struct { + Dataview *ModelBlockContentDataview `protobuf:"bytes,13,opt,name=dataview,proto3,oneof" json:"dataview,omitempty"` +} +type ModelBlockContentOfText struct { + Text *ModelBlockContentText `protobuf:"bytes,14,opt,name=text,proto3,oneof" json:"text,omitempty"` +} +type ModelBlockContentOfMedia struct { + Media *ModelBlockContentMedia `protobuf:"bytes,15,opt,name=media,proto3,oneof" json:"media,omitempty"` +} +type ModelBlockContentOfLayout struct { + Layout *ModelBlockContentLayout `protobuf:"bytes,16,opt,name=layout,proto3,oneof" json:"layout,omitempty"` +} +type ModelBlockContentOfDiv struct { + Div *ModelBlockContentDiv `protobuf:"bytes,17,opt,name=div,proto3,oneof" json:"div,omitempty"` +} + +func (*ModelBlockContentOfDashboard) isModelBlockContent() {} +func (*ModelBlockContentOfPage) isModelBlockContent() {} +func (*ModelBlockContentOfDataview) isModelBlockContent() {} +func (*ModelBlockContentOfText) isModelBlockContent() {} +func (*ModelBlockContentOfMedia) isModelBlockContent() {} +func (*ModelBlockContentOfLayout) isModelBlockContent() {} +func (*ModelBlockContentOfDiv) isModelBlockContent() {} + +func (m *ModelBlock) GetContent() isModelBlockContent { + if m != nil { + return m.Content + } + return nil +} + +func (m *ModelBlock) GetHeader() *ModelBlockHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *ModelBlock) GetChildren() []string { + if m != nil { + return m.Children + } + return nil +} + +func (m *ModelBlock) GetDashboard() *ModelBlockContentDashboard { + if x, ok := m.GetContent().(*ModelBlockContentOfDashboard); ok { + return x.Dashboard + } + return nil +} + +func (m *ModelBlock) GetPage() *ModelBlockContentPage { + if x, ok := m.GetContent().(*ModelBlockContentOfPage); ok { + return x.Page + } + return nil +} + +func (m *ModelBlock) GetDataview() *ModelBlockContentDataview { + if x, ok := m.GetContent().(*ModelBlockContentOfDataview); ok { + return x.Dataview + } + return nil +} + +func (m *ModelBlock) GetText() *ModelBlockContentText { + if x, ok := m.GetContent().(*ModelBlockContentOfText); ok { + return x.Text + } + return nil +} + +func (m *ModelBlock) GetMedia() *ModelBlockContentMedia { + if x, ok := m.GetContent().(*ModelBlockContentOfMedia); ok { + return x.Media + } + return nil +} + +func (m *ModelBlock) GetLayout() *ModelBlockContentLayout { + if x, ok := m.GetContent().(*ModelBlockContentOfLayout); ok { + return x.Layout + } + return nil +} + +func (m *ModelBlock) GetDiv() *ModelBlockContentDiv { + if x, ok := m.GetContent().(*ModelBlockContentOfDiv); ok { + return x.Div + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ModelBlock) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ModelBlockContentOfDashboard)(nil), + (*ModelBlockContentOfPage)(nil), + (*ModelBlockContentOfDataview)(nil), + (*ModelBlockContentOfText)(nil), + (*ModelBlockContentOfMedia)(nil), + (*ModelBlockContentOfLayout)(nil), + (*ModelBlockContentOfDiv)(nil), + } +} + +type ModelBlockHeader struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type ModelBlockHeaderType `protobuf:"varint,2,opt,name=type,proto3,enum=anytype.ModelBlockHeaderType" json:"type,omitempty"` + Fields *ModelStruct `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"` + Permissions *ModelBlockHeaderPermissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (m *ModelBlockHeader) Reset() { *m = ModelBlockHeader{} } +func (m *ModelBlockHeader) String() string { return proto.CompactTextString(m) } +func (*ModelBlockHeader) ProtoMessage() {} +func (*ModelBlockHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 0} +} +func (m *ModelBlockHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockHeader.Merge(m, src) +} +func (m *ModelBlockHeader) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockHeader) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockHeader proto.InternalMessageInfo + +func (m *ModelBlockHeader) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ModelBlockHeader) GetType() ModelBlockHeaderType { + if m != nil { + return m.Type + } + return ModelBlockHeader_DASHBOARD +} + +func (m *ModelBlockHeader) GetFields() *ModelStruct { + if m != nil { + return m.Fields + } + return nil +} + +func (m *ModelBlockHeader) GetPermissions() *ModelBlockHeaderPermissions { + if m != nil { + return m.Permissions + } + return nil +} + +type ModelBlockHeaderPermissions struct { + Read bool `protobuf:"varint,1,opt,name=read,proto3" json:"read,omitempty"` + Edit bool `protobuf:"varint,2,opt,name=edit,proto3" json:"edit,omitempty"` + Remove bool `protobuf:"varint,3,opt,name=remove,proto3" json:"remove,omitempty"` + Drag bool `protobuf:"varint,4,opt,name=drag,proto3" json:"drag,omitempty"` + DropOn bool `protobuf:"varint,5,opt,name=dropOn,proto3" json:"dropOn,omitempty"` +} + +func (m *ModelBlockHeaderPermissions) Reset() { *m = ModelBlockHeaderPermissions{} } +func (m *ModelBlockHeaderPermissions) String() string { return proto.CompactTextString(m) } +func (*ModelBlockHeaderPermissions) ProtoMessage() {} +func (*ModelBlockHeaderPermissions) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 0, 0} +} +func (m *ModelBlockHeaderPermissions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockHeaderPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockHeaderPermissions.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockHeaderPermissions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockHeaderPermissions.Merge(m, src) +} +func (m *ModelBlockHeaderPermissions) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockHeaderPermissions) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockHeaderPermissions.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockHeaderPermissions proto.InternalMessageInfo + +func (m *ModelBlockHeaderPermissions) GetRead() bool { + if m != nil { + return m.Read + } + return false +} + +func (m *ModelBlockHeaderPermissions) GetEdit() bool { + if m != nil { + return m.Edit + } + return false +} + +func (m *ModelBlockHeaderPermissions) GetRemove() bool { + if m != nil { + return m.Remove + } + return false +} + +func (m *ModelBlockHeaderPermissions) GetDrag() bool { + if m != nil { + return m.Drag + } + return false +} + +func (m *ModelBlockHeaderPermissions) GetDropOn() bool { + if m != nil { + return m.DropOn + } + return false +} + +type ModelBlockContent struct { +} + +func (m *ModelBlockContent) Reset() { *m = ModelBlockContent{} } +func (m *ModelBlockContent) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContent) ProtoMessage() {} +func (*ModelBlockContent) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1} +} +func (m *ModelBlockContent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContent.Merge(m, src) +} +func (m *ModelBlockContent) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContent) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContent.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContent proto.InternalMessageInfo + +type ModelBlockContentLayout struct { + Style ModelBlockContentLayoutStyle `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.ModelBlockContentLayoutStyle" json:"style,omitempty"` +} + +func (m *ModelBlockContentLayout) Reset() { *m = ModelBlockContentLayout{} } +func (m *ModelBlockContentLayout) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentLayout) ProtoMessage() {} +func (*ModelBlockContentLayout) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 0} +} +func (m *ModelBlockContentLayout) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentLayout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentLayout.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentLayout) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentLayout.Merge(m, src) +} +func (m *ModelBlockContentLayout) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentLayout) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentLayout.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentLayout proto.InternalMessageInfo + +func (m *ModelBlockContentLayout) GetStyle() ModelBlockContentLayoutStyle { + if m != nil { + return m.Style + } + return ModelBlockContentLayout_ROW +} + +type ModelBlockContentDiv struct { +} + +func (m *ModelBlockContentDiv) Reset() { *m = ModelBlockContentDiv{} } +func (m *ModelBlockContentDiv) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentDiv) ProtoMessage() {} +func (*ModelBlockContentDiv) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 1} +} +func (m *ModelBlockContentDiv) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentDiv) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentDiv.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentDiv) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentDiv.Merge(m, src) +} +func (m *ModelBlockContentDiv) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentDiv) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentDiv.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentDiv proto.InternalMessageInfo + +type ModelBlockContentDashboard struct { + Style ModelBlockContentDashboardStyle `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.ModelBlockContentDashboardStyle" json:"style,omitempty"` + Headers []*ModelBlockHeader `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (m *ModelBlockContentDashboard) Reset() { *m = ModelBlockContentDashboard{} } +func (m *ModelBlockContentDashboard) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentDashboard) ProtoMessage() {} +func (*ModelBlockContentDashboard) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 2} +} +func (m *ModelBlockContentDashboard) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentDashboard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentDashboard.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentDashboard) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentDashboard.Merge(m, src) +} +func (m *ModelBlockContentDashboard) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentDashboard) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentDashboard.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentDashboard proto.InternalMessageInfo + +func (m *ModelBlockContentDashboard) GetStyle() ModelBlockContentDashboardStyle { + if m != nil { + return m.Style + } + return ModelBlockContentDashboard_MAIN_SCREEN +} + +func (m *ModelBlockContentDashboard) GetHeaders() []*ModelBlockHeader { + if m != nil { + return m.Headers + } + return nil +} + +type ModelBlockContentDataview struct { +} + +func (m *ModelBlockContentDataview) Reset() { *m = ModelBlockContentDataview{} } +func (m *ModelBlockContentDataview) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentDataview) ProtoMessage() {} +func (*ModelBlockContentDataview) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 3} +} +func (m *ModelBlockContentDataview) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentDataview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentDataview.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentDataview) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentDataview.Merge(m, src) +} +func (m *ModelBlockContentDataview) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentDataview) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentDataview.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentDataview proto.InternalMessageInfo + +type ModelBlockContentText struct { + Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` + Style ModelBlockContentTextStyle `protobuf:"varint,2,opt,name=style,proto3,enum=anytype.ModelBlockContentTextStyle" json:"style,omitempty"` + MarksList *ModelBlockContentTextMarks `protobuf:"bytes,3,opt,name=marksList,proto3" json:"marksList,omitempty"` + Toggleable bool `protobuf:"varint,4,opt,name=toggleable,proto3" json:"toggleable,omitempty"` + MarkerType ModelBlockContentTextMarkerType `protobuf:"varint,5,opt,name=markerType,proto3,enum=anytype.ModelBlockContentTextMarkerType" json:"markerType,omitempty"` + Checkable bool `protobuf:"varint,6,opt,name=checkable,proto3" json:"checkable,omitempty"` + Checked bool `protobuf:"varint,7,opt,name=checked,proto3" json:"checked,omitempty"` +} + +func (m *ModelBlockContentText) Reset() { *m = ModelBlockContentText{} } +func (m *ModelBlockContentText) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentText) ProtoMessage() {} +func (*ModelBlockContentText) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 4} +} +func (m *ModelBlockContentText) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentText) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentText.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentText) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentText.Merge(m, src) +} +func (m *ModelBlockContentText) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentText) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentText.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentText proto.InternalMessageInfo + +func (m *ModelBlockContentText) GetText() string { + if m != nil { + return m.Text + } + return "" +} + +func (m *ModelBlockContentText) GetStyle() ModelBlockContentTextStyle { + if m != nil { + return m.Style + } + return ModelBlockContentText_p +} + +func (m *ModelBlockContentText) GetMarksList() *ModelBlockContentTextMarks { + if m != nil { + return m.MarksList + } + return nil +} + +func (m *ModelBlockContentText) GetToggleable() bool { + if m != nil { + return m.Toggleable + } + return false +} + +func (m *ModelBlockContentText) GetMarkerType() ModelBlockContentTextMarkerType { + if m != nil { + return m.MarkerType + } + return ModelBlockContentText_none +} + +func (m *ModelBlockContentText) GetCheckable() bool { + if m != nil { + return m.Checkable + } + return false +} + +func (m *ModelBlockContentText) GetChecked() bool { + if m != nil { + return m.Checked + } + return false +} + +type ModelBlockContentTextMarks struct { + Marks []*ModelBlockContentTextMark `protobuf:"bytes,1,rep,name=marks,proto3" json:"marks,omitempty"` +} + +func (m *ModelBlockContentTextMarks) Reset() { *m = ModelBlockContentTextMarks{} } +func (m *ModelBlockContentTextMarks) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentTextMarks) ProtoMessage() {} +func (*ModelBlockContentTextMarks) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 4, 0} +} +func (m *ModelBlockContentTextMarks) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentTextMarks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentTextMarks.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentTextMarks) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentTextMarks.Merge(m, src) +} +func (m *ModelBlockContentTextMarks) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentTextMarks) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentTextMarks.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentTextMarks proto.InternalMessageInfo + +func (m *ModelBlockContentTextMarks) GetMarks() []*ModelBlockContentTextMark { + if m != nil { + return m.Marks + } + return nil +} + +type ModelBlockContentTextMark struct { + Range *ModelRange `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` + Type ModelBlockContentTextMarkType `protobuf:"varint,2,opt,name=type,proto3,enum=anytype.ModelBlockContentTextMarkType" json:"type,omitempty"` + Param string `protobuf:"bytes,3,opt,name=param,proto3" json:"param,omitempty"` +} + +func (m *ModelBlockContentTextMark) Reset() { *m = ModelBlockContentTextMark{} } +func (m *ModelBlockContentTextMark) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentTextMark) ProtoMessage() {} +func (*ModelBlockContentTextMark) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 4, 1} +} +func (m *ModelBlockContentTextMark) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentTextMark) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentTextMark.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentTextMark) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentTextMark.Merge(m, src) +} +func (m *ModelBlockContentTextMark) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentTextMark) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentTextMark.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentTextMark proto.InternalMessageInfo + +func (m *ModelBlockContentTextMark) GetRange() *ModelRange { + if m != nil { + return m.Range + } + return nil +} + +func (m *ModelBlockContentTextMark) GetType() ModelBlockContentTextMarkType { + if m != nil { + return m.Type + } + return ModelBlockContentTextMark_STRIKETHROUGH +} + +func (m *ModelBlockContentTextMark) GetParam() string { + if m != nil { + return m.Param + } + return "" +} + +type ModelBlockContentMedia struct { + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + State ModelBlockContentMediaState `protobuf:"varint,2,opt,name=state,proto3,enum=anytype.ModelBlockContentMediaState" json:"state,omitempty"` + // Types that are valid to be assigned to Preview: + // *ModelBlockContentMediaPreviewOfVideo + // *ModelBlockContentMediaPreviewOfImage + // *ModelBlockContentMediaPreviewOfFile + Preview isModelBlockContentMediaPreview `protobuf_oneof:"preview"` +} + +func (m *ModelBlockContentMedia) Reset() { *m = ModelBlockContentMedia{} } +func (m *ModelBlockContentMedia) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentMedia) ProtoMessage() {} +func (*ModelBlockContentMedia) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 5} +} +func (m *ModelBlockContentMedia) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentMedia) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentMedia.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentMedia) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentMedia.Merge(m, src) +} +func (m *ModelBlockContentMedia) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentMedia) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentMedia.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentMedia proto.InternalMessageInfo + +type isModelBlockContentMediaPreview interface { + isModelBlockContentMediaPreview() + MarshalTo([]byte) (int, error) + Size() int +} + +type ModelBlockContentMediaPreviewOfVideo struct { + Video *ModelBlockContentMediaVideoPreview `protobuf:"bytes,101,opt,name=video,proto3,oneof" json:"video,omitempty"` +} +type ModelBlockContentMediaPreviewOfImage struct { + Image *ModelBlockContentMediaImagePreview `protobuf:"bytes,102,opt,name=image,proto3,oneof" json:"image,omitempty"` +} +type ModelBlockContentMediaPreviewOfFile struct { + File *ModelBlockContentMediaFilePreview `protobuf:"bytes,103,opt,name=file,proto3,oneof" json:"file,omitempty"` +} + +func (*ModelBlockContentMediaPreviewOfVideo) isModelBlockContentMediaPreview() {} +func (*ModelBlockContentMediaPreviewOfImage) isModelBlockContentMediaPreview() {} +func (*ModelBlockContentMediaPreviewOfFile) isModelBlockContentMediaPreview() {} + +func (m *ModelBlockContentMedia) GetPreview() isModelBlockContentMediaPreview { + if m != nil { + return m.Preview + } + return nil +} + +func (m *ModelBlockContentMedia) GetContent() []byte { + if m != nil { + return m.Content + } + return nil +} + +func (m *ModelBlockContentMedia) GetState() ModelBlockContentMediaState { + if m != nil { + return m.State + } + return ModelBlockContentMedia_EMPTY +} + +func (m *ModelBlockContentMedia) GetVideo() *ModelBlockContentMediaVideoPreview { + if x, ok := m.GetPreview().(*ModelBlockContentMediaPreviewOfVideo); ok { + return x.Video + } + return nil +} + +func (m *ModelBlockContentMedia) GetImage() *ModelBlockContentMediaImagePreview { + if x, ok := m.GetPreview().(*ModelBlockContentMediaPreviewOfImage); ok { + return x.Image + } + return nil +} + +func (m *ModelBlockContentMedia) GetFile() *ModelBlockContentMediaFilePreview { + if x, ok := m.GetPreview().(*ModelBlockContentMediaPreviewOfFile); ok { + return x.File + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ModelBlockContentMedia) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ModelBlockContentMediaPreviewOfVideo)(nil), + (*ModelBlockContentMediaPreviewOfImage)(nil), + (*ModelBlockContentMediaPreviewOfFile)(nil), + } +} + +type ModelBlockContentMediaVideoPreview struct { + Thumbnail []byte `protobuf:"bytes,1,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` +} + +func (m *ModelBlockContentMediaVideoPreview) Reset() { *m = ModelBlockContentMediaVideoPreview{} } +func (m *ModelBlockContentMediaVideoPreview) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentMediaVideoPreview) ProtoMessage() {} +func (*ModelBlockContentMediaVideoPreview) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 5, 0} +} +func (m *ModelBlockContentMediaVideoPreview) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentMediaVideoPreview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentMediaVideoPreview.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentMediaVideoPreview) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentMediaVideoPreview.Merge(m, src) +} +func (m *ModelBlockContentMediaVideoPreview) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentMediaVideoPreview) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentMediaVideoPreview.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentMediaVideoPreview proto.InternalMessageInfo + +func (m *ModelBlockContentMediaVideoPreview) GetThumbnail() []byte { + if m != nil { + return m.Thumbnail + } + return nil +} + +func (m *ModelBlockContentMediaVideoPreview) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ModelBlockContentMediaVideoPreview) GetWidth() int32 { + if m != nil { + return m.Width + } + return 0 +} + +type ModelBlockContentMediaImagePreview struct { + Thumbnail []byte `protobuf:"bytes,1,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` +} + +func (m *ModelBlockContentMediaImagePreview) Reset() { *m = ModelBlockContentMediaImagePreview{} } +func (m *ModelBlockContentMediaImagePreview) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentMediaImagePreview) ProtoMessage() {} +func (*ModelBlockContentMediaImagePreview) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 5, 1} +} +func (m *ModelBlockContentMediaImagePreview) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentMediaImagePreview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentMediaImagePreview.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentMediaImagePreview) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentMediaImagePreview.Merge(m, src) +} +func (m *ModelBlockContentMediaImagePreview) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentMediaImagePreview) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentMediaImagePreview.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentMediaImagePreview proto.InternalMessageInfo + +func (m *ModelBlockContentMediaImagePreview) GetThumbnail() []byte { + if m != nil { + return m.Thumbnail + } + return nil +} + +func (m *ModelBlockContentMediaImagePreview) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ModelBlockContentMediaImagePreview) GetWidth() int32 { + if m != nil { + return m.Width + } + return 0 +} + +type ModelBlockContentMediaFilePreview struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` +} + +func (m *ModelBlockContentMediaFilePreview) Reset() { *m = ModelBlockContentMediaFilePreview{} } +func (m *ModelBlockContentMediaFilePreview) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentMediaFilePreview) ProtoMessage() {} +func (*ModelBlockContentMediaFilePreview) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 5, 2} +} +func (m *ModelBlockContentMediaFilePreview) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentMediaFilePreview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentMediaFilePreview.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentMediaFilePreview) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentMediaFilePreview.Merge(m, src) +} +func (m *ModelBlockContentMediaFilePreview) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentMediaFilePreview) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentMediaFilePreview.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentMediaFilePreview proto.InternalMessageInfo + +func (m *ModelBlockContentMediaFilePreview) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ModelBlockContentMediaFilePreview) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +type ModelBlockContentPage struct { + Style ModelBlockContentPageStyle `protobuf:"varint,1,opt,name=style,proto3,enum=anytype.ModelBlockContentPageStyle" json:"style,omitempty"` +} + +func (m *ModelBlockContentPage) Reset() { *m = ModelBlockContentPage{} } +func (m *ModelBlockContentPage) String() string { return proto.CompactTextString(m) } +func (*ModelBlockContentPage) ProtoMessage() {} +func (*ModelBlockContentPage) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 0, 1, 6} +} +func (m *ModelBlockContentPage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelBlockContentPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelBlockContentPage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelBlockContentPage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelBlockContentPage.Merge(m, src) +} +func (m *ModelBlockContentPage) XXX_Size() int { + return m.Size() +} +func (m *ModelBlockContentPage) XXX_DiscardUnknown() { + xxx_messageInfo_ModelBlockContentPage.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelBlockContentPage proto.InternalMessageInfo + +func (m *ModelBlockContentPage) GetStyle() ModelBlockContentPageStyle { + if m != nil { + return m.Style + } + return ModelBlockContentPage_EMPTY +} + +type ModelRange struct { + From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` + To int32 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` +} + +func (m *ModelRange) Reset() { *m = ModelRange{} } +func (m *ModelRange) String() string { return proto.CompactTextString(m) } +func (*ModelRange) ProtoMessage() {} +func (*ModelRange) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 1} +} +func (m *ModelRange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelRange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelRange.Merge(m, src) +} +func (m *ModelRange) XXX_Size() int { + return m.Size() +} +func (m *ModelRange) XXX_DiscardUnknown() { + xxx_messageInfo_ModelRange.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelRange proto.InternalMessageInfo + +func (m *ModelRange) GetFrom() int32 { + if m != nil { + return m.From + } + return 0 +} + +func (m *ModelRange) GetTo() int32 { + if m != nil { + return m.To + } + return 0 +} + +type ModelStruct struct { + // Unordered map of dynamically typed values. + Fields map[string]*ModelStructValue `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ModelStruct) Reset() { *m = ModelStruct{} } +func (m *ModelStruct) String() string { return proto.CompactTextString(m) } +func (*ModelStruct) ProtoMessage() {} +func (*ModelStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 2} +} +func (m *ModelStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelStruct.Merge(m, src) +} +func (m *ModelStruct) XXX_Size() int { + return m.Size() +} +func (m *ModelStruct) XXX_DiscardUnknown() { + xxx_messageInfo_ModelStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelStruct proto.InternalMessageInfo + +func (m *ModelStruct) GetFields() map[string]*ModelStructValue { + if m != nil { + return m.Fields + } + return nil +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +type ModelStructValue struct { + // Types that are valid to be assigned to Kind: + // *ModelStructValueKindOfNullValue + // *ModelStructValueKindOfNumberValue + // *ModelStructValueKindOfStringValue + // *ModelStructValueKindOfBoolValue + // *ModelStructValueKindOfStructValue + // *ModelStructValueKindOfListValue + Kind isModelStructValueKind `protobuf_oneof:"kind"` +} + +func (m *ModelStructValue) Reset() { *m = ModelStructValue{} } +func (m *ModelStructValue) String() string { return proto.CompactTextString(m) } +func (*ModelStructValue) ProtoMessage() {} +func (*ModelStructValue) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 2, 1} +} +func (m *ModelStructValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelStructValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelStructValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelStructValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelStructValue.Merge(m, src) +} +func (m *ModelStructValue) XXX_Size() int { + return m.Size() +} +func (m *ModelStructValue) XXX_DiscardUnknown() { + xxx_messageInfo_ModelStructValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelStructValue proto.InternalMessageInfo + +type isModelStructValueKind interface { + isModelStructValueKind() + MarshalTo([]byte) (int, error) + Size() int +} + +type ModelStructValueKindOfNullValue struct { + NullValue ModelStructNullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=anytype.ModelStructNullValue,oneof" json:"null_value,omitempty"` +} +type ModelStructValueKindOfNumberValue struct { + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof" json:"number_value,omitempty"` +} +type ModelStructValueKindOfStringValue struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` +} +type ModelStructValueKindOfBoolValue struct { + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` +} +type ModelStructValueKindOfStructValue struct { + StructValue *ModelStruct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof" json:"struct_value,omitempty"` +} +type ModelStructValueKindOfListValue struct { + ListValue *ModelStructListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof" json:"list_value,omitempty"` +} + +func (*ModelStructValueKindOfNullValue) isModelStructValueKind() {} +func (*ModelStructValueKindOfNumberValue) isModelStructValueKind() {} +func (*ModelStructValueKindOfStringValue) isModelStructValueKind() {} +func (*ModelStructValueKindOfBoolValue) isModelStructValueKind() {} +func (*ModelStructValueKindOfStructValue) isModelStructValueKind() {} +func (*ModelStructValueKindOfListValue) isModelStructValueKind() {} + +func (m *ModelStructValue) GetKind() isModelStructValueKind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *ModelStructValue) GetNullValue() ModelStructNullValue { + if x, ok := m.GetKind().(*ModelStructValueKindOfNullValue); ok { + return x.NullValue + } + return ModelStruct_NULL_VALUE +} + +func (m *ModelStructValue) GetNumberValue() float64 { + if x, ok := m.GetKind().(*ModelStructValueKindOfNumberValue); ok { + return x.NumberValue + } + return 0 +} + +func (m *ModelStructValue) GetStringValue() string { + if x, ok := m.GetKind().(*ModelStructValueKindOfStringValue); ok { + return x.StringValue + } + return "" +} + +func (m *ModelStructValue) GetBoolValue() bool { + if x, ok := m.GetKind().(*ModelStructValueKindOfBoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *ModelStructValue) GetStructValue() *ModelStruct { + if x, ok := m.GetKind().(*ModelStructValueKindOfStructValue); ok { + return x.StructValue + } + return nil +} + +func (m *ModelStructValue) GetListValue() *ModelStructListValue { + if x, ok := m.GetKind().(*ModelStructValueKindOfListValue); ok { + return x.ListValue + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ModelStructValue) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ModelStructValueKindOfNullValue)(nil), + (*ModelStructValueKindOfNumberValue)(nil), + (*ModelStructValueKindOfStringValue)(nil), + (*ModelStructValueKindOfBoolValue)(nil), + (*ModelStructValueKindOfStructValue)(nil), + (*ModelStructValueKindOfListValue)(nil), + } +} + +// `ListValue` is a wrapper around a repeated field of values. +type ModelStructListValue struct { + Values []*ModelStructValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (m *ModelStructListValue) Reset() { *m = ModelStructListValue{} } +func (m *ModelStructListValue) String() string { return proto.CompactTextString(m) } +func (*ModelStructListValue) ProtoMessage() {} +func (*ModelStructListValue) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 2, 2} +} +func (m *ModelStructListValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelStructListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelStructListValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelStructListValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelStructListValue.Merge(m, src) +} +func (m *ModelStructListValue) XXX_Size() int { + return m.Size() +} +func (m *ModelStructListValue) XXX_DiscardUnknown() { + xxx_messageInfo_ModelStructListValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelStructListValue proto.InternalMessageInfo + +func (m *ModelStructListValue) GetValues() []*ModelStructValue { + if m != nil { + return m.Values + } + return nil +} + +//* +// Contains basic information about user account +type ModelAccount struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Avatar *ModelAccountAvatar `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` +} + +func (m *ModelAccount) Reset() { *m = ModelAccount{} } +func (m *ModelAccount) String() string { return proto.CompactTextString(m) } +func (*ModelAccount) ProtoMessage() {} +func (*ModelAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 3} +} +func (m *ModelAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelAccount.Merge(m, src) +} +func (m *ModelAccount) XXX_Size() int { + return m.Size() +} +func (m *ModelAccount) XXX_DiscardUnknown() { + xxx_messageInfo_ModelAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelAccount proto.InternalMessageInfo + +func (m *ModelAccount) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ModelAccount) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ModelAccount) GetAvatar() *ModelAccountAvatar { + if m != nil { + return m.Avatar + } + return nil +} + +//* +// Avatar of a user's account. It could be an image or color +type ModelAccountAvatar struct { + // Types that are valid to be assigned to Avatar: + // *ModelAccountAvatarAvatarOfImage + // *ModelAccountAvatarAvatarOfColor + Avatar isModelAccountAvatarAvatar `protobuf_oneof:"avatar"` +} + +func (m *ModelAccountAvatar) Reset() { *m = ModelAccountAvatar{} } +func (m *ModelAccountAvatar) String() string { return proto.CompactTextString(m) } +func (*ModelAccountAvatar) ProtoMessage() {} +func (*ModelAccountAvatar) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 3, 0} +} +func (m *ModelAccountAvatar) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelAccountAvatar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelAccountAvatar.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelAccountAvatar) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelAccountAvatar.Merge(m, src) +} +func (m *ModelAccountAvatar) XXX_Size() int { + return m.Size() +} +func (m *ModelAccountAvatar) XXX_DiscardUnknown() { + xxx_messageInfo_ModelAccountAvatar.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelAccountAvatar proto.InternalMessageInfo + +type isModelAccountAvatarAvatar interface { + isModelAccountAvatarAvatar() + MarshalTo([]byte) (int, error) + Size() int +} + +type ModelAccountAvatarAvatarOfImage struct { + Image *ModelImage `protobuf:"bytes,1,opt,name=image,proto3,oneof" json:"image,omitempty"` +} +type ModelAccountAvatarAvatarOfColor struct { + Color string `protobuf:"bytes,2,opt,name=color,proto3,oneof" json:"color,omitempty"` +} + +func (*ModelAccountAvatarAvatarOfImage) isModelAccountAvatarAvatar() {} +func (*ModelAccountAvatarAvatarOfColor) isModelAccountAvatarAvatar() {} + +func (m *ModelAccountAvatar) GetAvatar() isModelAccountAvatarAvatar { + if m != nil { + return m.Avatar + } + return nil +} + +func (m *ModelAccountAvatar) GetImage() *ModelImage { + if x, ok := m.GetAvatar().(*ModelAccountAvatarAvatarOfImage); ok { + return x.Image + } + return nil +} + +func (m *ModelAccountAvatar) GetColor() string { + if x, ok := m.GetAvatar().(*ModelAccountAvatarAvatarOfColor); ok { + return x.Color + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ModelAccountAvatar) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ModelAccountAvatarAvatarOfImage)(nil), + (*ModelAccountAvatarAvatarOfColor)(nil), + } +} + +type ModelImage struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Sizes []ModelImageSize `protobuf:"varint,2,rep,packed,name=sizes,proto3,enum=anytype.ModelImageSize" json:"sizes,omitempty"` +} + +func (m *ModelImage) Reset() { *m = ModelImage{} } +func (m *ModelImage) String() string { return proto.CompactTextString(m) } +func (*ModelImage) ProtoMessage() {} +func (*ModelImage) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 4} +} +func (m *ModelImage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelImage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelImage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelImage.Merge(m, src) +} +func (m *ModelImage) XXX_Size() int { + return m.Size() +} +func (m *ModelImage) XXX_DiscardUnknown() { + xxx_messageInfo_ModelImage.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelImage proto.InternalMessageInfo + +func (m *ModelImage) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ModelImage) GetSizes() []ModelImageSize { + if m != nil { + return m.Sizes + } + return nil +} + +type ModelVideo struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Sizes []ModelVideoSize `protobuf:"varint,2,rep,packed,name=sizes,proto3,enum=anytype.ModelVideoSize" json:"sizes,omitempty"` +} + +func (m *ModelVideo) Reset() { *m = ModelVideo{} } +func (m *ModelVideo) String() string { return proto.CompactTextString(m) } +func (*ModelVideo) ProtoMessage() {} +func (*ModelVideo) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 5} +} +func (m *ModelVideo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelVideo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelVideo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelVideo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelVideo.Merge(m, src) +} +func (m *ModelVideo) XXX_Size() int { + return m.Size() +} +func (m *ModelVideo) XXX_DiscardUnknown() { + xxx_messageInfo_ModelVideo.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelVideo proto.InternalMessageInfo + +func (m *ModelVideo) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ModelVideo) GetSizes() []ModelVideoSize { + if m != nil { + return m.Sizes + } + return nil +} + +type ModelPreview struct { +} + +func (m *ModelPreview) Reset() { *m = ModelPreview{} } +func (m *ModelPreview) String() string { return proto.CompactTextString(m) } +func (*ModelPreview) ProtoMessage() {} +func (*ModelPreview) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 6} +} +func (m *ModelPreview) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelPreview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelPreview.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelPreview) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelPreview.Merge(m, src) +} +func (m *ModelPreview) XXX_Size() int { + return m.Size() +} +func (m *ModelPreview) XXX_DiscardUnknown() { + xxx_messageInfo_ModelPreview.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelPreview proto.InternalMessageInfo + +type ModelPreviewLink struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ImageUrl string `protobuf:"bytes,3,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` + FaviconUrl string `protobuf:"bytes,5,opt,name=faviconUrl,proto3" json:"faviconUrl,omitempty"` + Type ModelPreviewLinkType `protobuf:"varint,6,opt,name=type,proto3,enum=anytype.ModelPreviewLinkType" json:"type,omitempty"` +} + +func (m *ModelPreviewLink) Reset() { *m = ModelPreviewLink{} } +func (m *ModelPreviewLink) String() string { return proto.CompactTextString(m) } +func (*ModelPreviewLink) ProtoMessage() {} +func (*ModelPreviewLink) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5431a010549573, []int{0, 6, 0} +} +func (m *ModelPreviewLink) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModelPreviewLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModelPreviewLink.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModelPreviewLink) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModelPreviewLink.Merge(m, src) +} +func (m *ModelPreviewLink) XXX_Size() int { + return m.Size() +} +func (m *ModelPreviewLink) XXX_DiscardUnknown() { + xxx_messageInfo_ModelPreviewLink.DiscardUnknown(m) +} + +var xxx_messageInfo_ModelPreviewLink proto.InternalMessageInfo + +func (m *ModelPreviewLink) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *ModelPreviewLink) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ModelPreviewLink) GetImageUrl() string { + if m != nil { + return m.ImageUrl + } + return "" +} + +func (m *ModelPreviewLink) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *ModelPreviewLink) GetFaviconUrl() string { + if m != nil { + return m.FaviconUrl + } + return "" +} + +func (m *ModelPreviewLink) GetType() ModelPreviewLinkType { + if m != nil { + return m.Type + } + return ModelPreviewLink_PAGE +} + +func init() { + proto.RegisterEnum("anytype.ModelBlockHeaderType", ModelBlockHeaderType_name, ModelBlockHeaderType_value) + proto.RegisterEnum("anytype.ModelBlockContentLayoutStyle", ModelBlockContentLayoutStyle_name, ModelBlockContentLayoutStyle_value) + proto.RegisterEnum("anytype.ModelBlockContentDashboardStyle", ModelBlockContentDashboardStyle_name, ModelBlockContentDashboardStyle_value) + proto.RegisterEnum("anytype.ModelBlockContentTextStyle", ModelBlockContentTextStyle_name, ModelBlockContentTextStyle_value) + proto.RegisterEnum("anytype.ModelBlockContentTextMarkerType", ModelBlockContentTextMarkerType_name, ModelBlockContentTextMarkerType_value) + proto.RegisterEnum("anytype.ModelBlockContentTextMarkType", ModelBlockContentTextMarkType_name, ModelBlockContentTextMarkType_value) + proto.RegisterEnum("anytype.ModelBlockContentMediaState", ModelBlockContentMediaState_name, ModelBlockContentMediaState_value) + proto.RegisterEnum("anytype.ModelBlockContentPageStyle", ModelBlockContentPageStyle_name, ModelBlockContentPageStyle_value) + proto.RegisterEnum("anytype.ModelStructNullValue", ModelStructNullValue_name, ModelStructNullValue_value) + proto.RegisterEnum("anytype.ModelImageSize", ModelImageSize_name, ModelImageSize_value) + proto.RegisterEnum("anytype.ModelVideoSize", ModelVideoSize_name, ModelVideoSize_value) + proto.RegisterEnum("anytype.ModelPreviewLinkType", ModelPreviewLinkType_name, ModelPreviewLinkType_value) + proto.RegisterType((*Model)(nil), "anytype.Model") + proto.RegisterType((*ModelBlock)(nil), "anytype.Model.Block") + proto.RegisterType((*ModelBlockHeader)(nil), "anytype.Model.Block.Header") + proto.RegisterType((*ModelBlockHeaderPermissions)(nil), "anytype.Model.Block.Header.Permissions") + proto.RegisterType((*ModelBlockContent)(nil), "anytype.Model.Block.Content") + proto.RegisterType((*ModelBlockContentLayout)(nil), "anytype.Model.Block.Content.Layout") + proto.RegisterType((*ModelBlockContentDiv)(nil), "anytype.Model.Block.Content.Div") + proto.RegisterType((*ModelBlockContentDashboard)(nil), "anytype.Model.Block.Content.Dashboard") + proto.RegisterType((*ModelBlockContentDataview)(nil), "anytype.Model.Block.Content.Dataview") + proto.RegisterType((*ModelBlockContentText)(nil), "anytype.Model.Block.Content.Text") + proto.RegisterType((*ModelBlockContentTextMarks)(nil), "anytype.Model.Block.Content.Text.Marks") + proto.RegisterType((*ModelBlockContentTextMark)(nil), "anytype.Model.Block.Content.Text.Mark") + proto.RegisterType((*ModelBlockContentMedia)(nil), "anytype.Model.Block.Content.Media") + proto.RegisterType((*ModelBlockContentMediaVideoPreview)(nil), "anytype.Model.Block.Content.Media.VideoPreview") + proto.RegisterType((*ModelBlockContentMediaImagePreview)(nil), "anytype.Model.Block.Content.Media.ImagePreview") + proto.RegisterType((*ModelBlockContentMediaFilePreview)(nil), "anytype.Model.Block.Content.Media.FilePreview") + proto.RegisterType((*ModelBlockContentPage)(nil), "anytype.Model.Block.Content.Page") + proto.RegisterType((*ModelRange)(nil), "anytype.Model.Range") + proto.RegisterType((*ModelStruct)(nil), "anytype.Model.Struct") + proto.RegisterMapType((map[string]*ModelStructValue)(nil), "anytype.Model.Struct.FieldsEntry") + proto.RegisterType((*ModelStructValue)(nil), "anytype.Model.Struct.Value") + proto.RegisterType((*ModelStructListValue)(nil), "anytype.Model.Struct.ListValue") + proto.RegisterType((*ModelAccount)(nil), "anytype.Model.Account") + proto.RegisterType((*ModelAccountAvatar)(nil), "anytype.Model.Account.Avatar") + proto.RegisterType((*ModelImage)(nil), "anytype.Model.Image") + proto.RegisterType((*ModelVideo)(nil), "anytype.Model.Video") + proto.RegisterType((*ModelPreview)(nil), "anytype.Model.Preview") + proto.RegisterType((*ModelPreviewLink)(nil), "anytype.Model.Preview.Link") +} + +func init() { proto.RegisterFile("models.proto", fileDescriptor_0b5431a010549573) } + +var fileDescriptor_0b5431a010549573 = []byte{ + // 1793 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4d, 0x6f, 0xe3, 0xd6, + 0xd5, 0x16, 0x25, 0x52, 0x1f, 0x47, 0x1e, 0xcf, 0xcd, 0x45, 0x12, 0xf0, 0x65, 0xe6, 0x75, 0x1c, + 0x05, 0xcd, 0x4c, 0x9b, 0x54, 0xf1, 0xd8, 0x9e, 0x26, 0x1d, 0x34, 0x4d, 0x24, 0x8b, 0x63, 0x09, + 0xd6, 0x87, 0x71, 0x25, 0x79, 0x66, 0xba, 0x31, 0x68, 0xf1, 0xda, 0x26, 0x4c, 0x91, 0x0a, 0x45, + 0x39, 0xf1, 0xa0, 0xdb, 0xee, 0xfb, 0x13, 0x0a, 0xb4, 0xff, 0xa1, 0x40, 0x17, 0x05, 0xba, 0xeb, + 0x32, 0xed, 0xa6, 0x5d, 0x16, 0x33, 0xff, 0xa1, 0x45, 0x77, 0xc5, 0x39, 0x97, 0x94, 0xe5, 0x19, + 0xc7, 0x56, 0x81, 0xae, 0x74, 0xcf, 0xe5, 0xf3, 0x9c, 0x73, 0x78, 0xcf, 0xd7, 0xa5, 0x60, 0x65, + 0x1c, 0xba, 0xd2, 0x9f, 0x56, 0x27, 0x51, 0x18, 0x87, 0xbc, 0xe0, 0x04, 0x17, 0xf1, 0xc5, 0x44, + 0x56, 0x7e, 0xb7, 0x0e, 0x46, 0x07, 0x9f, 0x58, 0x7f, 0x79, 0x07, 0x8c, 0xba, 0x1f, 0x8e, 0xce, + 0xf8, 0x16, 0xe4, 0x4f, 0xa5, 0xe3, 0xca, 0xc8, 0xd4, 0xd6, 0xb5, 0x07, 0xe5, 0xcd, 0xf7, 0xaa, + 0x09, 0xba, 0x4a, 0xc8, 0x2a, 0xa1, 0xaa, 0x4d, 0x82, 0x88, 0x04, 0xca, 0x2d, 0x28, 0x8e, 0x4e, + 0x3d, 0xdf, 0x8d, 0x64, 0x60, 0x66, 0xd7, 0x73, 0x0f, 0x4a, 0x62, 0x2e, 0xf3, 0x27, 0x50, 0x72, + 0x9d, 0xe9, 0xe9, 0x51, 0xe8, 0x44, 0xae, 0x59, 0x26, 0x9d, 0x1f, 0x5d, 0xab, 0x73, 0x27, 0x0c, + 0x62, 0x19, 0xc4, 0xd5, 0x46, 0x8a, 0x6e, 0x66, 0xc4, 0x25, 0x95, 0x7f, 0x06, 0xfa, 0xc4, 0x39, + 0x91, 0xe6, 0x0a, 0xa9, 0xf8, 0xe0, 0x46, 0x15, 0xfb, 0xce, 0x89, 0x6c, 0x66, 0x04, 0x11, 0xf8, + 0x0e, 0x14, 0x5d, 0x27, 0x76, 0xce, 0x3d, 0xf9, 0x8d, 0x79, 0x87, 0xc8, 0x3f, 0xb8, 0xc5, 0xbe, + 0x02, 0x37, 0x33, 0x62, 0x4e, 0x44, 0xeb, 0xb1, 0xfc, 0x36, 0x36, 0x57, 0x97, 0xb0, 0x3e, 0x90, + 0xdf, 0xc6, 0x68, 0x1d, 0x09, 0xfc, 0x31, 0x18, 0x63, 0xe9, 0x7a, 0x8e, 0x79, 0x97, 0x98, 0x95, + 0x1b, 0x99, 0x1d, 0x44, 0x36, 0x33, 0x42, 0x51, 0xf8, 0x17, 0x90, 0xf7, 0x9d, 0x8b, 0x70, 0x16, + 0x9b, 0x8c, 0xc8, 0x1f, 0xde, 0x48, 0x6e, 0x13, 0xb4, 0x99, 0x11, 0x09, 0x89, 0x6f, 0x43, 0xce, + 0xf5, 0xce, 0xcd, 0xb7, 0x88, 0xbb, 0x7e, 0xf3, 0x3b, 0x7b, 0xe7, 0xcd, 0x8c, 0x40, 0xb8, 0xf5, + 0xa7, 0x1c, 0xe4, 0x55, 0x78, 0xf9, 0x2a, 0x64, 0x3d, 0x97, 0xf2, 0xa0, 0x24, 0xb2, 0x9e, 0xcb, + 0xb7, 0x41, 0x47, 0x0d, 0x66, 0x76, 0x5d, 0x7b, 0xb0, 0xfa, 0x3d, 0x1a, 0x15, 0xb5, 0x3a, 0xb8, + 0x98, 0x48, 0x41, 0x68, 0xfe, 0x63, 0xc8, 0x1f, 0x7b, 0xd2, 0x77, 0xa7, 0x66, 0x8e, 0x3c, 0x79, + 0xe7, 0x35, 0x5e, 0x3f, 0x8e, 0x66, 0xa3, 0x58, 0x24, 0x20, 0xde, 0x82, 0xf2, 0x44, 0x46, 0x63, + 0x6f, 0x3a, 0xf5, 0xc2, 0x60, 0x6a, 0xea, 0xc4, 0xb9, 0x7f, 0x93, 0xad, 0xfd, 0x4b, 0xb8, 0x58, + 0xe4, 0x5a, 0x17, 0x50, 0x5e, 0x78, 0xc6, 0x39, 0xe8, 0x91, 0x74, 0xd4, 0x0b, 0x15, 0x05, 0xad, + 0x71, 0x4f, 0xba, 0x5e, 0x4c, 0xaf, 0x54, 0x14, 0xb4, 0xe6, 0xef, 0x42, 0x3e, 0x92, 0xe3, 0xf0, + 0x5c, 0x92, 0xc3, 0x45, 0x91, 0x48, 0x88, 0x75, 0x23, 0xe7, 0x84, 0x5c, 0x2a, 0x0a, 0x5a, 0x23, + 0xd6, 0x8d, 0xc2, 0x49, 0x2f, 0x30, 0x0d, 0x85, 0x55, 0x52, 0xe5, 0x97, 0xa0, 0xe3, 0x11, 0xf0, + 0x3b, 0x50, 0x6a, 0xd4, 0xfa, 0xcd, 0x7a, 0xaf, 0x26, 0x1a, 0x2c, 0xc3, 0x8b, 0xa0, 0xef, 0xd7, + 0x76, 0x6d, 0xa6, 0xf1, 0x15, 0x28, 0x36, 0x6a, 0x83, 0xda, 0x41, 0xcb, 0x7e, 0xca, 0xb2, 0xb8, + 0x3f, 0xb0, 0x9f, 0x0d, 0x58, 0x0e, 0x57, 0x4f, 0x5a, 0x6d, 0x9b, 0xe9, 0xbc, 0x0c, 0x85, 0xfd, + 0xd6, 0xce, 0x60, 0x28, 0x6c, 0x66, 0xf0, 0x12, 0x18, 0x07, 0xad, 0x86, 0xdd, 0x63, 0x79, 0x64, + 0xd6, 0x7b, 0xbd, 0xbd, 0x4e, 0x4d, 0xec, 0xb1, 0x02, 0x07, 0xc8, 0xb7, 0x6b, 0xcf, 0x7b, 0xc3, + 0x01, 0x2b, 0xf2, 0x02, 0xe4, 0x1a, 0xad, 0x03, 0x56, 0xb2, 0xfe, 0x75, 0x07, 0x0a, 0x49, 0x68, + 0xad, 0x13, 0xc8, 0xab, 0xcc, 0xe0, 0x5f, 0x82, 0x31, 0x8d, 0x2f, 0x7c, 0x49, 0x07, 0xb0, 0xba, + 0xf9, 0xc3, 0x25, 0xb2, 0xa9, 0xda, 0x47, 0x82, 0x50, 0xbc, 0xca, 0x3d, 0x30, 0x48, 0x46, 0x43, + 0xa2, 0xf7, 0x94, 0x65, 0xd0, 0xfa, 0x4e, 0xaf, 0x3d, 0xec, 0x74, 0x99, 0x66, 0x19, 0x90, 0x6b, + 0x78, 0xe7, 0xd6, 0x6f, 0x34, 0x28, 0xcd, 0x4b, 0x98, 0xd7, 0xaf, 0xda, 0xfc, 0x64, 0xb9, 0xca, + 0xbf, 0x62, 0x96, 0x3f, 0x82, 0x82, 0xea, 0x33, 0x53, 0x6a, 0x2e, 0xb7, 0xf4, 0xa4, 0x14, 0x5b, + 0x31, 0x53, 0x6f, 0xef, 0x42, 0xb9, 0x53, 0x6b, 0x75, 0x0f, 0xfb, 0x3b, 0xc2, 0xb6, 0xbb, 0x2c, + 0x63, 0x01, 0x14, 0xd3, 0x22, 0xb7, 0xfe, 0x66, 0x80, 0x8e, 0x05, 0x8b, 0xd1, 0xa5, 0x0a, 0x57, + 0xe9, 0xae, 0x8a, 0xf7, 0x8b, 0xd4, 0x7b, 0x95, 0xf1, 0xf7, 0x6f, 0x2d, 0xfb, 0xab, 0x8e, 0xdb, + 0x50, 0x1a, 0x3b, 0xd1, 0xd9, 0xb4, 0xed, 0x4d, 0xe3, 0x24, 0xf9, 0x97, 0x50, 0xd1, 0x41, 0x8a, + 0xb8, 0x64, 0xf2, 0x35, 0x80, 0x38, 0x3c, 0x39, 0xf1, 0xa5, 0x73, 0xe4, 0xcb, 0x24, 0xfb, 0x16, + 0x76, 0x78, 0x1b, 0x00, 0xc1, 0x32, 0xc2, 0x8c, 0xa3, 0x3c, 0xbc, 0xed, 0xa0, 0xe7, 0x76, 0x14, + 0x47, 0x2c, 0xf0, 0xf9, 0x3d, 0x28, 0x8d, 0x4e, 0xe5, 0xe8, 0x8c, 0x8c, 0xe5, 0xc9, 0xd8, 0xe5, + 0x06, 0x37, 0xa1, 0x40, 0x82, 0x74, 0xcd, 0x02, 0x3d, 0x4b, 0x45, 0xcb, 0x06, 0x83, 0x3c, 0xe7, + 0x3f, 0x03, 0x83, 0x7c, 0x37, 0x35, 0x0a, 0xd6, 0x47, 0xcb, 0x79, 0x22, 0x14, 0xc9, 0xfa, 0xab, + 0x06, 0x3a, 0xca, 0xfc, 0x47, 0x60, 0x44, 0x4e, 0x70, 0x22, 0x93, 0x39, 0xf4, 0xf6, 0x6b, 0x6a, + 0x04, 0x3e, 0x13, 0x0a, 0xc2, 0xbf, 0xbc, 0xd2, 0x98, 0x3e, 0x5e, 0xce, 0xe2, 0x62, 0x8f, 0x7a, + 0x1b, 0x8c, 0x89, 0x13, 0x39, 0x63, 0x8a, 0x52, 0x49, 0x28, 0xa1, 0xb2, 0x9b, 0x14, 0xf1, 0x5b, + 0x70, 0xa7, 0x3f, 0x10, 0xad, 0x3d, 0x7b, 0xd0, 0x14, 0xbd, 0xe1, 0x6e, 0x93, 0x65, 0xb0, 0x08, + 0xf7, 0xec, 0xe7, 0xaa, 0xac, 0x35, 0x2c, 0x83, 0xd6, 0xa0, 0xd6, 0x6e, 0xed, 0xa8, 0x52, 0xae, + 0xf7, 0xda, 0x0d, 0x55, 0xca, 0xed, 0x56, 0x77, 0x8f, 0xe9, 0x95, 0x9d, 0x34, 0x15, 0x0d, 0xd0, + 0x26, 0x2c, 0xc3, 0xf3, 0x90, 0x3d, 0x7d, 0xc8, 0x34, 0xfa, 0xdd, 0x64, 0x59, 0xfa, 0xdd, 0x62, + 0x39, 0xfa, 0xdd, 0x66, 0x3a, 0x56, 0xfb, 0xd7, 0xb3, 0x30, 0x96, 0xcc, 0x40, 0x25, 0xa3, 0xd0, + 0x95, 0x2c, 0x5f, 0xa9, 0x02, 0x5c, 0x86, 0x0c, 0xf7, 0x83, 0x30, 0x90, 0xaa, 0x06, 0x83, 0xd9, + 0xf8, 0x48, 0x46, 0xca, 0x91, 0xa3, 0x99, 0xef, 0xcb, 0x98, 0x65, 0xad, 0x7f, 0xea, 0x60, 0xd0, + 0x40, 0xa1, 0xa0, 0xa9, 0xb7, 0xa7, 0xc3, 0x5c, 0x11, 0xa9, 0xc8, 0x7f, 0x8e, 0x09, 0xee, 0xc4, + 0xe9, 0xc9, 0x3d, 0xb8, 0x7d, 0x3a, 0x55, 0xfb, 0x88, 0x17, 0x8a, 0xc6, 0x77, 0xc1, 0x38, 0xf7, + 0x5c, 0x19, 0x9a, 0x92, 0x82, 0xf4, 0xe9, 0x12, 0xfc, 0x03, 0xc4, 0xef, 0x47, 0x32, 0x19, 0xb1, + 0x8a, 0x8f, 0x8a, 0xbc, 0x31, 0x8e, 0xf7, 0xe3, 0xa5, 0x15, 0xb5, 0x10, 0xbf, 0xa0, 0x88, 0xf8, + 0xbc, 0x01, 0xfa, 0xb1, 0xe7, 0x4b, 0xf3, 0x84, 0xf4, 0x54, 0x97, 0xd0, 0xf3, 0xc4, 0xf3, 0x17, + 0xd4, 0x10, 0xdb, 0x3a, 0x80, 0x95, 0x45, 0x3f, 0xb1, 0x28, 0xe2, 0xd3, 0xd9, 0xf8, 0x28, 0x70, + 0x3c, 0x3f, 0x39, 0xc3, 0xcb, 0x0d, 0x6c, 0x1d, 0x81, 0x33, 0x56, 0x87, 0x58, 0x12, 0xb4, 0xc6, + 0x8c, 0xfa, 0xc6, 0x73, 0xe3, 0x53, 0xca, 0x28, 0x43, 0x28, 0x01, 0xf5, 0x2e, 0xba, 0xfd, 0x3f, + 0xd3, 0xfb, 0x08, 0xca, 0x0b, 0xaf, 0x31, 0x27, 0x6a, 0x0b, 0x44, 0x0e, 0xba, 0x37, 0x0a, 0x83, + 0x54, 0x19, 0xae, 0x2b, 0x2d, 0xcc, 0x4b, 0x8c, 0x63, 0x09, 0x0c, 0xbb, 0xb3, 0x3f, 0x78, 0xce, + 0x32, 0x38, 0xb1, 0x86, 0xfb, 0xed, 0x5e, 0xad, 0xd1, 0xea, 0xee, 0x32, 0x8d, 0xa6, 0x90, 0xb0, + 0x93, 0x31, 0x75, 0x17, 0xca, 0x8d, 0xde, 0xd3, 0x6e, 0xfa, 0x94, 0x52, 0xbc, 0xd1, 0xeb, 0xda, + 0x4c, 0xaf, 0x97, 0xa0, 0x30, 0x51, 0xd6, 0xad, 0x17, 0xa0, 0xe3, 0x05, 0xec, 0xb2, 0x7b, 0x6a, + 0x4b, 0x74, 0x4f, 0x64, 0x5c, 0x9d, 0x36, 0x5b, 0x69, 0xd1, 0x2c, 0x38, 0x87, 0x73, 0xb2, 0xd6, + 0xdf, 0x53, 0xf3, 0x73, 0x3e, 0x05, 0xb3, 0x38, 0x90, 0xfa, 0xf6, 0x80, 0xe5, 0xd0, 0x8d, 0x24, + 0xb7, 0xad, 0x8f, 0xc1, 0xa0, 0x26, 0x81, 0x6f, 0x7e, 0x1c, 0x85, 0x63, 0x72, 0xc3, 0x10, 0xb4, + 0xc6, 0xab, 0x4d, 0x1c, 0xd2, 0x59, 0x18, 0x22, 0x1b, 0x87, 0xd6, 0xef, 0x75, 0xc8, 0xab, 0x8b, + 0x08, 0xff, 0xe9, 0xfc, 0xbe, 0xa2, 0x1a, 0xd8, 0x07, 0xd7, 0xde, 0x57, 0xaa, 0x4f, 0x08, 0x63, + 0x07, 0x71, 0x74, 0x91, 0xde, 0x5d, 0xac, 0x03, 0x0c, 0xc3, 0x7c, 0x9b, 0x33, 0xc8, 0x9d, 0xc9, + 0x8b, 0x24, 0x0a, 0xb8, 0xe4, 0x0f, 0xc1, 0x38, 0x77, 0xfc, 0x99, 0x0a, 0xe9, 0x9b, 0x83, 0x2c, + 0x51, 0x7d, 0x80, 0x10, 0xa1, 0x90, 0x8f, 0xb3, 0x9f, 0x6b, 0xd6, 0x1f, 0xb2, 0x60, 0xd0, 0x26, + 0xff, 0x0a, 0x20, 0x98, 0xf9, 0xfe, 0xa1, 0xd2, 0xa2, 0x0e, 0xf6, 0xfd, 0xeb, 0xb5, 0x74, 0x67, + 0xbe, 0x4f, 0x24, 0xbc, 0x47, 0x07, 0xa9, 0xc0, 0x3f, 0x84, 0x15, 0xd5, 0x2e, 0x0e, 0x2f, 0x3d, + 0xd1, 0x9a, 0x19, 0x51, 0x56, 0xbb, 0x73, 0xd0, 0x34, 0x8e, 0xbc, 0xe0, 0x24, 0x01, 0x51, 0x5b, + 0x44, 0x90, 0xda, 0x55, 0xa0, 0xf7, 0x01, 0x8e, 0xc2, 0x30, 0xf5, 0x85, 0xe6, 0x12, 0x9a, 0xc2, + 0x3d, 0x05, 0x78, 0x4c, 0x5a, 0x66, 0xa3, 0x38, 0x81, 0x18, 0x37, 0xdc, 0xff, 0x12, 0xe5, 0xb3, + 0x51, 0x3c, 0x7f, 0x51, 0xdf, 0x9b, 0xa6, 0xcc, 0x3c, 0x31, 0xbf, 0xe7, 0x45, 0x71, 0x48, 0xce, + 0x5f, 0xd4, 0x4f, 0x85, 0x7a, 0x1e, 0xf4, 0x33, 0x2f, 0x70, 0xad, 0xaf, 0xa0, 0x34, 0x47, 0xe0, + 0xe7, 0x0d, 0x69, 0x4c, 0x83, 0x7b, 0x63, 0x04, 0x12, 0x68, 0xe5, 0x3d, 0x28, 0xcd, 0x0f, 0x93, + 0xaf, 0x02, 0x74, 0x87, 0xed, 0xf6, 0xe1, 0x41, 0xad, 0x3d, 0xb4, 0x59, 0xc6, 0xfa, 0xa3, 0x06, + 0x85, 0xda, 0x68, 0x14, 0xce, 0x82, 0xf8, 0x8d, 0x0b, 0xf3, 0x75, 0x05, 0xfc, 0x08, 0xf2, 0xce, + 0xb9, 0x13, 0x3b, 0x51, 0x72, 0x23, 0xf8, 0xff, 0xd7, 0x3c, 0x48, 0x74, 0x55, 0x6b, 0x04, 0x12, + 0x09, 0xd8, 0x7a, 0x06, 0x79, 0xb5, 0xc3, 0x3f, 0x49, 0x5b, 0xe5, 0xf5, 0x83, 0x91, 0xfa, 0xcb, + 0x65, 0x3f, 0x7c, 0x17, 0x8c, 0x51, 0xe8, 0x87, 0x91, 0xf2, 0x01, 0xf7, 0x49, 0xac, 0x17, 0x53, + 0x37, 0xac, 0xaf, 0xc1, 0x20, 0xce, 0x1b, 0xde, 0x7f, 0x0a, 0xc6, 0xd4, 0x7b, 0x21, 0xd5, 0xad, + 0x6b, 0x75, 0xf3, 0xff, 0xae, 0x33, 0x54, 0xed, 0x7b, 0x2f, 0xb0, 0x62, 0x11, 0x57, 0xb9, 0x0f, + 0x3a, 0x8a, 0x58, 0xb0, 0xed, 0x9a, 0xd8, 0xb5, 0x59, 0x06, 0x97, 0xfd, 0x4e, 0xad, 0xdd, 0x66, + 0x1a, 0x2e, 0x07, 0xcd, 0x61, 0xa7, 0xce, 0xb2, 0xd6, 0x6f, 0x35, 0x30, 0xa8, 0xbf, 0xfe, 0xb7, + 0x36, 0x89, 0x74, 0xc5, 0xe6, 0xf3, 0xc4, 0x66, 0x19, 0x0a, 0xfd, 0xc6, 0xe1, 0xd6, 0x4f, 0x36, + 0x70, 0xbe, 0x2a, 0x61, 0xfb, 0xf3, 0x8d, 0x89, 0xea, 0x60, 0xcd, 0xc6, 0xe1, 0x67, 0x9b, 0x1b, + 0x13, 0x96, 0xc5, 0xb6, 0xd1, 0x6c, 0x1c, 0x3e, 0xdc, 0xc0, 0x47, 0x39, 0xea, 0x75, 0x28, 0x6e, + 0x6f, 0x6f, 0x4c, 0x98, 0x9e, 0x8a, 0x9b, 0x0f, 0x51, 0x8b, 0x61, 0xfd, 0x2a, 0x0b, 0x85, 0xa4, + 0xa3, 0x5a, 0xff, 0xd6, 0x40, 0x6f, 0x7b, 0xc1, 0x19, 0xf6, 0xdf, 0xd8, 0x8b, 0xfd, 0xb4, 0xb7, + 0x2a, 0x81, 0xaf, 0x43, 0xd9, 0x95, 0xd3, 0x51, 0xe4, 0x4d, 0x62, 0x6f, 0xde, 0x63, 0x17, 0xb7, + 0xf0, 0x13, 0x99, 0x02, 0x32, 0x8c, 0xfc, 0xe4, 0x92, 0x31, 0x97, 0xb1, 0x4f, 0xcc, 0x22, 0x9f, + 0x2a, 0xa8, 0x24, 0x70, 0x89, 0x57, 0xbe, 0x63, 0xe7, 0x1c, 0x7b, 0x34, 0xe2, 0x0d, 0x7a, 0xb0, + 0xb0, 0x33, 0xff, 0x12, 0xcb, 0x5f, 0xfb, 0x25, 0x96, 0x38, 0x5d, 0x45, 0x87, 0x17, 0x6e, 0x39, + 0x95, 0x47, 0xc9, 0x7d, 0x26, 0xfd, 0x0a, 0xa1, 0xf0, 0xb4, 0x3a, 0xea, 0x83, 0x24, 0xfd, 0x04, + 0xc9, 0x62, 0x86, 0x0f, 0xbb, 0xf6, 0xb3, 0x7d, 0x7b, 0x67, 0x60, 0x37, 0x58, 0xae, 0x7e, 0xef, + 0xcf, 0x2f, 0xd7, 0xb4, 0xef, 0x5e, 0xae, 0x69, 0xff, 0x78, 0xb9, 0xa6, 0xfd, 0xfa, 0xd5, 0x5a, + 0xe6, 0xbb, 0x57, 0x6b, 0x99, 0xbf, 0xbf, 0x5a, 0xcb, 0xfc, 0x22, 0x3b, 0x39, 0x3a, 0xca, 0xd3, + 0x9f, 0x0a, 0x5b, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x90, 0x17, 0xde, 0x64, 0x10, 0x00, + 0x00, +} + +func (m *Model) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Model) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Model) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ModelBlock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Content != nil { + { + size := m.Content.Size() + i -= size + if _, err := m.Content.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Children) > 0 { + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Children[iNdEx]) + copy(dAtA[i:], m.Children[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.Children[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentOfDashboard) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfDashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Dashboard != nil { + { + size, err := m.Dashboard.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentOfPage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfPage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Page != nil { + { + size, err := m.Page.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentOfDataview) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfDataview) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Dataview != nil { + { + size, err := m.Dataview.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentOfText) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfText) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Text != nil { + { + size, err := m.Text.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentOfMedia) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfMedia) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Media != nil { + { + size, err := m.Media.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentOfLayout) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfLayout) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Layout != nil { + { + size, err := m.Layout.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentOfDiv) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentOfDiv) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Div != nil { + { + size, err := m.Div.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + return len(dAtA) - i, nil +} +func (m *ModelBlockHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Permissions != nil { + { + size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Fields != nil { + { + size, err := m.Fields.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Type != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockHeaderPermissions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockHeaderPermissions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockHeaderPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DropOn { + i-- + if m.DropOn { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Drag { + i-- + if m.Drag { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Remove { + i-- + if m.Remove { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.Edit { + i-- + if m.Edit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Read { + i-- + if m.Read { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentLayout) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentLayout) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentLayout) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Style != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentDiv) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentDiv) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentDiv) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentDashboard) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentDashboard) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentDashboard) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Headers) > 0 { + for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Headers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Style != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentDataview) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentDataview) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentDataview) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentText) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentText) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentText) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Checked { + i-- + if m.Checked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.Checkable { + i-- + if m.Checkable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.MarkerType != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.MarkerType)) + i-- + dAtA[i] = 0x28 + } + if m.Toggleable { + i-- + if m.Toggleable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.MarksList != nil { + { + size, err := m.MarksList.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Style != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x10 + } + if len(m.Text) > 0 { + i -= len(m.Text) + copy(dAtA[i:], m.Text) + i = encodeVarintModels(dAtA, i, uint64(len(m.Text))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentTextMarks) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentTextMarks) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentTextMarks) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Marks) > 0 { + for iNdEx := len(m.Marks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Marks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentTextMark) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentTextMark) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentTextMark) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Param) > 0 { + i -= len(m.Param) + copy(dAtA[i:], m.Param) + i = encodeVarintModels(dAtA, i, uint64(len(m.Param))) + i-- + dAtA[i] = 0x1a + } + if m.Type != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + } + if m.Range != nil { + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentMedia) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentMedia) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMedia) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Preview != nil { + { + size := m.Preview.Size() + i -= size + if _, err := m.Preview.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.State != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + if len(m.Content) > 0 { + i -= len(m.Content) + copy(dAtA[i:], m.Content) + i = encodeVarintModels(dAtA, i, uint64(len(m.Content))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentMediaPreviewOfVideo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMediaPreviewOfVideo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Video != nil { + { + size, err := m.Video.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xaa + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentMediaPreviewOfImage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMediaPreviewOfImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Image != nil { + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xb2 + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentMediaPreviewOfFile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMediaPreviewOfFile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.File != nil { + { + size, err := m.File.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xba + } + return len(dAtA) - i, nil +} +func (m *ModelBlockContentMediaVideoPreview) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentMediaVideoPreview) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMediaVideoPreview) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Width != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Width)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintModels(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Thumbnail) > 0 { + i -= len(m.Thumbnail) + copy(dAtA[i:], m.Thumbnail) + i = encodeVarintModels(dAtA, i, uint64(len(m.Thumbnail))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentMediaImagePreview) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentMediaImagePreview) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMediaImagePreview) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Width != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Width)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintModels(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Thumbnail) > 0 { + i -= len(m.Thumbnail) + copy(dAtA[i:], m.Thumbnail) + i = encodeVarintModels(dAtA, i, uint64(len(m.Thumbnail))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentMediaFilePreview) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentMediaFilePreview) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentMediaFilePreview) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Icon) > 0 { + i -= len(m.Icon) + copy(dAtA[i:], m.Icon) + i = encodeVarintModels(dAtA, i, uint64(len(m.Icon))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintModels(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelBlockContentPage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelBlockContentPage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelBlockContentPage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Style != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Style)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModelRange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.To != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.To)) + i-- + dAtA[i] = 0x10 + } + if m.From != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModelStruct) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelStruct) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStruct) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Fields) > 0 { + for k := range m.Fields { + v := m.Fields[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintModels(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintModels(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ModelStructValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelStructValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Kind != nil { + { + size := m.Kind.Size() + i -= size + if _, err := m.Kind.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ModelStructValueKindOfNullValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValueKindOfNullValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintModels(dAtA, i, uint64(m.NullValue)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} +func (m *ModelStructValueKindOfNumberValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValueKindOfNumberValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) + i-- + dAtA[i] = 0x11 + return len(dAtA) - i, nil +} +func (m *ModelStructValueKindOfStringValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValueKindOfStringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.StringValue) + copy(dAtA[i:], m.StringValue) + i = encodeVarintModels(dAtA, i, uint64(len(m.StringValue))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *ModelStructValueKindOfBoolValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValueKindOfBoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *ModelStructValueKindOfStructValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValueKindOfStructValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.StructValue != nil { + { + size, err := m.StructValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *ModelStructValueKindOfListValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructValueKindOfListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ListValue != nil { + { + size, err := m.ListValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *ModelStructListValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelStructListValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelStructListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ModelAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Avatar != nil { + { + size, err := m.Avatar.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintModels(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelAccountAvatar) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelAccountAvatar) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelAccountAvatar) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Avatar != nil { + { + size := m.Avatar.Size() + i -= size + if _, err := m.Avatar.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ModelAccountAvatarAvatarOfImage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelAccountAvatarAvatarOfImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Image != nil { + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *ModelAccountAvatarAvatarOfColor) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelAccountAvatarAvatarOfColor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Color) + copy(dAtA[i:], m.Color) + i = encodeVarintModels(dAtA, i, uint64(len(m.Color))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil +} +func (m *ModelImage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelImage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sizes) > 0 { + dAtA22 := make([]byte, len(m.Sizes)*10) + var j21 int + for _, num := range m.Sizes { + for num >= 1<<7 { + dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j21++ + } + dAtA22[j21] = uint8(num) + j21++ + } + i -= j21 + copy(dAtA[i:], dAtA22[:j21]) + i = encodeVarintModels(dAtA, i, uint64(j21)) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelVideo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelVideo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelVideo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sizes) > 0 { + dAtA24 := make([]byte, len(m.Sizes)*10) + var j23 int + for _, num := range m.Sizes { + for num >= 1<<7 { + dAtA24[j23] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j23++ + } + dAtA24[j23] = uint8(num) + j23++ + } + i -= j23 + copy(dAtA[i:], dAtA24[:j23]) + i = encodeVarintModels(dAtA, i, uint64(j23)) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModelPreview) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelPreview) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelPreview) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ModelPreviewLink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModelPreviewLink) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModelPreviewLink) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Type != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x30 + } + if len(m.FaviconUrl) > 0 { + i -= len(m.FaviconUrl) + copy(dAtA[i:], m.FaviconUrl) + i = encodeVarintModels(dAtA, i, uint64(len(m.FaviconUrl))) + i-- + dAtA[i] = 0x2a + } + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintModels(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0x22 + } + if len(m.ImageUrl) > 0 { + i -= len(m.ImageUrl) + copy(dAtA[i:], m.ImageUrl) + i = encodeVarintModels(dAtA, i, uint64(len(m.ImageUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintModels(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintModels(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintModels(dAtA []byte, offset int, v uint64) int { + offset -= sovModels(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Model) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ModelBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Children) > 0 { + for _, s := range m.Children { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + if m.Content != nil { + n += m.Content.Size() + } + return n +} + +func (m *ModelBlockContentOfDashboard) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dashboard != nil { + l = m.Dashboard.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentOfPage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Page != nil { + l = m.Page.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentOfDataview) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dataview != nil { + l = m.Dataview.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentOfText) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Text != nil { + l = m.Text.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentOfMedia) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Media != nil { + l = m.Media.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentOfLayout) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Layout != nil { + l = m.Layout.Size() + n += 2 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentOfDiv) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Div != nil { + l = m.Div.Size() + n += 2 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovModels(uint64(m.Type)) + } + if m.Fields != nil { + l = m.Fields.Size() + n += 1 + l + sovModels(uint64(l)) + } + if m.Permissions != nil { + l = m.Permissions.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *ModelBlockHeaderPermissions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Read { + n += 2 + } + if m.Edit { + n += 2 + } + if m.Remove { + n += 2 + } + if m.Drag { + n += 2 + } + if m.DropOn { + n += 2 + } + return n +} + +func (m *ModelBlockContent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ModelBlockContentLayout) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Style != 0 { + n += 1 + sovModels(uint64(m.Style)) + } + return n +} + +func (m *ModelBlockContentDiv) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ModelBlockContentDashboard) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Style != 0 { + n += 1 + sovModels(uint64(m.Style)) + } + if len(m.Headers) > 0 { + for _, e := range m.Headers { + l = e.Size() + n += 1 + l + sovModels(uint64(l)) + } + } + return n +} + +func (m *ModelBlockContentDataview) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ModelBlockContentText) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Text) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Style != 0 { + n += 1 + sovModels(uint64(m.Style)) + } + if m.MarksList != nil { + l = m.MarksList.Size() + n += 1 + l + sovModels(uint64(l)) + } + if m.Toggleable { + n += 2 + } + if m.MarkerType != 0 { + n += 1 + sovModels(uint64(m.MarkerType)) + } + if m.Checkable { + n += 2 + } + if m.Checked { + n += 2 + } + return n +} + +func (m *ModelBlockContentTextMarks) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Marks) > 0 { + for _, e := range m.Marks { + l = e.Size() + n += 1 + l + sovModels(uint64(l)) + } + } + return n +} + +func (m *ModelBlockContentTextMark) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Range != nil { + l = m.Range.Size() + n += 1 + l + sovModels(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovModels(uint64(m.Type)) + } + l = len(m.Param) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *ModelBlockContentMedia) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Content) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.State != 0 { + n += 1 + sovModels(uint64(m.State)) + } + if m.Preview != nil { + n += m.Preview.Size() + } + return n +} + +func (m *ModelBlockContentMediaPreviewOfVideo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Video != nil { + l = m.Video.Size() + n += 2 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentMediaPreviewOfImage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 2 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentMediaPreviewOfFile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.File != nil { + l = m.File.Size() + n += 2 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelBlockContentMediaVideoPreview) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Thumbnail) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Width != 0 { + n += 1 + sovModels(uint64(m.Width)) + } + return n +} + +func (m *ModelBlockContentMediaImagePreview) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Thumbnail) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Width != 0 { + n += 1 + sovModels(uint64(m.Width)) + } + return n +} + +func (m *ModelBlockContentMediaFilePreview) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Icon) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *ModelBlockContentPage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Style != 0 { + n += 1 + sovModels(uint64(m.Style)) + } + return n +} + +func (m *ModelRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.From != 0 { + n += 1 + sovModels(uint64(m.From)) + } + if m.To != 0 { + n += 1 + sovModels(uint64(m.To)) + } + return n +} + +func (m *ModelStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fields) > 0 { + for k, v := range m.Fields { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovModels(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + l + n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ModelStructValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != nil { + n += m.Kind.Size() + } + return n +} + +func (m *ModelStructValueKindOfNullValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovModels(uint64(m.NullValue)) + return n +} +func (m *ModelStructValueKindOfNumberValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *ModelStructValueKindOfStringValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StringValue) + n += 1 + l + sovModels(uint64(l)) + return n +} +func (m *ModelStructValueKindOfBoolValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *ModelStructValueKindOfStructValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StructValue != nil { + l = m.StructValue.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelStructValueKindOfListValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ListValue != nil { + l = m.ListValue.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelStructListValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovModels(uint64(l)) + } + } + return n +} + +func (m *ModelAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Avatar != nil { + l = m.Avatar.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *ModelAccountAvatar) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Avatar != nil { + n += m.Avatar.Size() + } + return n +} + +func (m *ModelAccountAvatarAvatarOfImage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} +func (m *ModelAccountAvatarAvatarOfColor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Color) + n += 1 + l + sovModels(uint64(l)) + return n +} +func (m *ModelImage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Sizes) > 0 { + l = 0 + for _, e := range m.Sizes { + l += sovModels(uint64(e)) + } + n += 1 + sovModels(uint64(l)) + l + } + return n +} + +func (m *ModelVideo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Sizes) > 0 { + l = 0 + for _, e := range m.Sizes { + l += sovModels(uint64(e)) + } + n += 1 + sovModels(uint64(l)) + l + } + return n +} + +func (m *ModelPreview) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ModelPreviewLink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.ImageUrl) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Url) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.FaviconUrl) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovModels(uint64(m.Type)) + } + return n +} + +func sovModels(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozModels(x uint64) (n int) { + return sovModels(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Model) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Model: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Model: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &ModelBlockHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dashboard", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentDashboard{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfDashboard{v} + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentPage{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfPage{v} + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dataview", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentDataview{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfDataview{v} + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentText{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfText{v} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Media", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentMedia{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfMedia{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Layout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentLayout{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfLayout{v} + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Div", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentDiv{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Content = &ModelBlockContentOfDiv{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= ModelBlockHeaderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fields == nil { + m.Fields = &ModelStruct{} + } + if err := m.Fields.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Permissions == nil { + m.Permissions = &ModelBlockHeaderPermissions{} + } + if err := m.Permissions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockHeaderPermissions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Permissions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Read", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Read = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Edit", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Edit = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Remove", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Remove = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Drag", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Drag = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DropOn", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DropOn = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Content: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Content: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentLayout) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Layout: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Layout: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + m.Style = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Style |= ModelBlockContentLayoutStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentDiv) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Div: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Div: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentDashboard) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Dashboard: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dashboard: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + m.Style = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Style |= ModelBlockContentDashboardStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Headers = append(m.Headers, &ModelBlockHeader{}) + if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentDataview) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Dataview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dataview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentText) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Text: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Text: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Text = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + m.Style = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Style |= ModelBlockContentTextStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarksList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MarksList == nil { + m.MarksList = &ModelBlockContentTextMarks{} + } + if err := m.MarksList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Toggleable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Toggleable = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MarkerType", wireType) + } + m.MarkerType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MarkerType |= ModelBlockContentTextMarkerType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Checkable = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Checked = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentTextMarks) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Marks: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Marks: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Marks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Marks = append(m.Marks, &ModelBlockContentTextMark{}) + if err := m.Marks[len(m.Marks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentTextMark) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mark: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mark: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Range == nil { + m.Range = &ModelRange{} + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= ModelBlockContentTextMarkType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Param", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Param = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentMedia) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Media: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Media: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Content = append(m.Content[:0], dAtA[iNdEx:postIndex]...) + if m.Content == nil { + m.Content = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= ModelBlockContentMediaState(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 101: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Video", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentMediaVideoPreview{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Preview = &ModelBlockContentMediaPreviewOfVideo{v} + iNdEx = postIndex + case 102: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentMediaImagePreview{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Preview = &ModelBlockContentMediaPreviewOfImage{v} + iNdEx = postIndex + case 103: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field File", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelBlockContentMediaFilePreview{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Preview = &ModelBlockContentMediaPreviewOfFile{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentMediaVideoPreview) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VideoPreview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VideoPreview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Thumbnail", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Thumbnail = append(m.Thumbnail[:0], dAtA[iNdEx:postIndex]...) + if m.Thumbnail == nil { + m.Thumbnail = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentMediaImagePreview) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImagePreview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImagePreview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Thumbnail", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Thumbnail = append(m.Thumbnail[:0], dAtA[iNdEx:postIndex]...) + if m.Thumbnail == nil { + m.Thumbnail = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentMediaFilePreview) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilePreview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilePreview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Icon = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelBlockContentPage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Page: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Page: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Style", wireType) + } + m.Style = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Style |= ModelBlockContentPageStyle(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelRange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Range: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelStruct) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Struct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fields == nil { + m.Fields = make(map[string]*ModelStructValue) + } + var mapkey string + var mapvalue *ModelStructValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthModels + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthModels + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthModels + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ModelStructValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fields[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelStructValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) + } + var v ModelStructNullValue + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelStructNullValue(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Kind = &ModelStructValueKindOfNullValue{v} + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Kind = &ModelStructValueKindOfNumberValue{float64(math.Float64frombits(v))} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = &ModelStructValueKindOfStringValue{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Kind = &ModelStructValueKindOfBoolValue{b} + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelStruct{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &ModelStructValueKindOfStructValue{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelStructListValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &ModelStructValueKindOfListValue{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelStructListValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, &ModelStructValue{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Account: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Avatar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Avatar == nil { + m.Avatar = &ModelAccountAvatar{} + } + if err := m.Avatar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelAccountAvatar) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Avatar: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Avatar: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModelImage{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Avatar = &ModelAccountAvatarAvatarOfImage{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Color", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Avatar = &ModelAccountAvatarAvatarOfColor{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelImage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType == 0 { + var v ModelImageSize + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelImageSize(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Sizes = append(m.Sizes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Sizes) == 0 { + m.Sizes = make([]ModelImageSize, 0, elementCount) + } + for iNdEx < postIndex { + var v ModelImageSize + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelImageSize(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Sizes = append(m.Sizes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Sizes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelVideo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Video: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Video: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType == 0 { + var v ModelVideoSize + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelVideoSize(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Sizes = append(m.Sizes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Sizes) == 0 { + m.Sizes = make([]ModelVideoSize, 0, elementCount) + } + for iNdEx < postIndex { + var v ModelVideoSize + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ModelVideoSize(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Sizes = append(m.Sizes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Sizes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelPreview) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Preview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Preview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModelPreviewLink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Link: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FaviconUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FaviconUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= ModelPreviewLinkType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipModels(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModels + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModels + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModels + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthModels + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupModels + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthModels + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthModels = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowModels = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pb/protos/account.proto b/pb/protos/account.proto deleted file mode 100644 index 007eeb00d..000000000 --- a/pb/protos/account.proto +++ /dev/null @@ -1,175 +0,0 @@ -syntax="proto3"; -package anytype; -option go_package = "pb"; - -import "file.proto"; - -message Avatar { - oneof avatar { - Image image = 1; - string color = 2; - } -} - -message Account { - string id = 1; - string name = 2; - Avatar avatar = 3; -} - -message WalletCreateRequest { - string rootPath = 1; -} - -message WalletCreateResponse { - Error error = 1; - string mnemonic = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - - FAILED_TO_CREATE_LOCAL_REPO = 101; - // ... - } - } -} - -message WalletRecoverRequest { - string rootPath = 1; - string mnemonic = 2; -} - -message WalletRecoverResponse { - Error error = 1; - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - - FAILED_TO_CREATE_LOCAL_REPO = 101; - } - } -} - -message AccountCreateRequest { - string name = 1; - oneof avatar { - string avatarLocalPath = 2; - string avatarColor = 3; - } -} - -message AccountCreateResponse { - Error error = 1; - Account account = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - - ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE = 101; - ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME = 102; - ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR = 103; - } - } -} - -// Start accounts search for recovered mnemonic -message AccountRecoverRequest {} - -// Found accounts will come in event AccountAdd -message AccountRecoverResponse { - Error error = 1; - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - NO_ACCOUNTS_FOUND = 101; - NEED_TO_RECOVER_WALLET_FIRST = 102; - FAILED_TO_CREATE_LOCAL_REPO = 103; - LOCAL_REPO_EXISTS_BUT_CORRUPTED = 104; - FAILED_TO_RUN_NODE = 105; - } - } -} - -message AccountSelectRequest { - string id = 1; - // optional, set if this is the first request - string rootPath = 2; -} - -message AccountSelectResponse { - Error error = 1; - Account account = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - - FAILED_TO_CREATE_LOCAL_REPO = 101; - LOCAL_REPO_EXISTS_BUT_CORRUPTED = 102; - FAILED_TO_RUN_NODE = 103; - FAILED_TO_FIND_ACCOUNT_INFO = 104; - LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET = 105; - - } - } -} - -message AccountStartRequest { - string id = 1; -} - -message AccountStartResponse { - Error error = 1; - Account account = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - - LOCAL_REPO_DOESNT_EXIST = 101; - LOCAL_REPO_EXISTS_BUT_CORRUPTED = 102; - FAILED_TO_RUN_NODE = 103; - FAILED_TO_FIND_ACCOUNT_INFO = 104; - } - } -} - -message AccountShow { - int64 index = 1; - Account account = 2; -} diff --git a/pb/protos/block.proto b/pb/protos/block.proto deleted file mode 100644 index 4b6542ee1..000000000 --- a/pb/protos/block.proto +++ /dev/null @@ -1,349 +0,0 @@ -syntax="proto3"; -package anytype; -option go_package = "pb"; - -import "struct.proto"; - - -// commands -// -message BlockOpenRequest { - string id = 1; -} - -message BlockOpenResponse { - Error error = 1; - BlockHeader blockHeader = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - } - } -} - -message BlockCreateRequest { - BlockType type = 1; -} - -message BlockCreateResponse { - Error error = 1; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - } - } -} - -message BlockUpdateRequest { - BlockChanges changes = 1; -} - -message BlockUpdateResponse { - Error error = 1; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - } - } -} - -// events -// - -// call -message BlockShow { - Block block = 1; -} - -message BlockUpdate { - BlockChanges changes = 1; -} - -message BlockCreate { - Block block = 1; -} - -message BlockContentTextChange { - oneof change { - string text = 1; - BlockContentText.Style style = 2; - BlockContentText.Marks marks = 3; - - bool toggleable = 4; - BlockContentText.MarkerType markerType = 5; - - bool checkable = 6; - bool checked = 7; - } -} - -message BlockContentPageChange { - oneof change { - BlockContentPage.Style style = 1; - BlockConnectionsList structure = 2; - BlocksList blocks = 3; - } -} - -message BlockHeaderChange { - oneof change { - string id = 1; - BlockType type = 2; - string name = 3; - string icon = 4; - - BlockPermissions permissions = 5; - } -} - -message BlockContentDashboardChange { - oneof change { - BlockContentDashboard.Style style = 1; - BlockConnectionsList structure = 2; - BlockHeadersList headers = 3; - } -} - -message BlockAtomicChange { - string id = 1; - oneof change { - BlockContentTextChange text = 2; - BlockHeaderChange blockHeader = 3; - BlockContentPageChange page = 4; - BlockContentDashboardChange dashboard = 5; - } -} - -message BlockChanges { - repeated BlockAtomicChange changes = 1; -} - -// models -// - -message Block { - BlockHeader header = 1; - - oneof content { - BlockContentDashboard dashboard = 11; - BlockContentPage page = 12; - BlockContentDataview dataview = 13; - - BlockContentText text = 14; - BlockContentMedia media = 15; - } -} - -message BlockHeader { - string id = 1; - BlockType type = 2; - Struct fields = 3; - BlockPermissions permissions = 4; -} - -message BlockPermissions { - bool read = 1; - bool edit = 2; - bool remove = 3; - bool drag = 4; - bool dropOn = 5; -} - -enum BlockType { - DASHBOARD = 0; - PAGE = 1; - DATAVIEW = 2; - - TEXT = 3; - FILE = 4; - PICTURE = 5; - VIDEO = 6; -} - -message BlockConnections { - string id = 1; - string next = 2; - string columnBottom = 3; - string rowRight = 4; - string inner = 5; -} - -message BlockConnectionsList { - repeated BlockConnections structure = 1; -} - -message BlockHeadersList { - repeated BlockHeader headers = 1; -} - -message BlocksList { - repeated Block blocks = 1; -} - -message BlockContentPage { - enum Style { - EMPTY = 0; - TASK = 1; - BOOKMARK = 2; - SET = 3; - // ... - } - - Style style = 1; - BlockConnectionsList structure = 2; - BlocksList blocks = 3; -} - -message BlockContentDashboard { - enum Style { - MAIN_SCREEN = 0; - // ... - } - - Style style = 1; - BlockConnectionsList structure = 2; - BlockHeadersList headers = 3; -} - -message BlockContentDataview { - // ... -} - -message BlockContentText { - enum Style { - p = 0; - h1 = 1; - h2 = 2; - h3 = 3; - h4 = 4; - quote = 5; - } - - enum MarkerType { - none = 0; - number = 1; - bullet = 2; - } - - message Marks { - repeated Mark marks = 1; - } - - message Mark { - - enum Type { - STRIKETHROUGH = 0; - KEYBOARD = 1; - ITALIC = 2; - BOLD = 3; - LINK = 4; - } - - Range range = 1; - Type type = 2; - string param = 3; // link, color, etc - } - - string text = 1; - Style style = 2; - Marks marksList = 3; - - bool toggleable = 4; - MarkerType markerType = 5; - - bool checkable = 6; - bool checked = 7; -} - -message BlockContentMedia { - string link = 1; -} - -message Range { - int32 from = 1; - int32 to = 2; -} -/* -message Scheme { - oneof scheme { - PageScheme pageScheme = 1; - DataviewScheme dataviewScheme = 2; - } -} - -message DataviewScheme { - // ... -} - -message PageScheme { - BlockHeader header = 1; - BlockConnectionsList structure = 2; - BlockHeadersList headers = 3; -} - -message BlockContentPreview { - oneof preview { - bool noPreview = 1; - ImagePreview imagePreview = 2; - VideoPreview videoPreview = 3; - FilePreview filePreview = 4; - TextPreview textPreview = 5; - EmptyPagePreview emptyPagePreview = 6; - TaskPagePreview taskPagePreview = 7; - } -} - -message ImagePreview { - string name = 1; - int32 height = 2; - int32 width = 3; -} - -message VideoPreview { - string name = 1; - int32 height = 2; - int32 width = 3; -} - -message FilePreview { - string name = 1; - string icon = 2; -} - -message TextPreview { - int32 symblos = 1; - BlockContentText.Style style = 2; -} - -message EmptyPagePreview { - string name = 1; - string icon = 2; -} - -message TaskPagePreview { - string header = 1; - string assignee = 2; - // ... -} -*/ \ No newline at end of file diff --git a/pb/protos/changes.proto b/pb/protos/changes.proto new file mode 100644 index 000000000..af5b0b4d7 --- /dev/null +++ b/pb/protos/changes.proto @@ -0,0 +1,78 @@ +syntax="proto3"; +package anytype; +option go_package = "pb"; +import "models.proto"; + +message Change { + message Block { + message Header { + oneof change { + string id = 1; + Model.Block.Header.Type type = 2; + string name = 3; + string icon = 4; + + Model.Block.Header.Permissions permissions = 5; + } + } + + message Children { + repeated string children = 1; + } + + message Content { + + message Page { + oneof change { + Model.Block.Content.Page.Style style = 1; + Model.Block block = 2; + } + } + + message Dashboard { + oneof change { + Model.Block.Content.Dashboard.Style style = 1; + Model.Block.Header header = 2; // not a dashboard header – one of children + } + } + + message Media { + oneof change { + string link = 1; + Model.Block.Content.Media.State state = 2; + } + } + + message Text { + oneof change { + string text = 1; + Model.Block.Content.Text.Style style = 2; + Model.Block.Content.Text.Marks marks = 3; + + bool toggleable = 4; + Model.Block.Content.Text.MarkerType markerType = 5; + + bool checkable = 6; + bool checked = 7; + } + } + } + } + + +} +message BlocksListSingleChange { + repeated string id = 1; + oneof change { + Change.Block.Content.Text text = 2; + Change.Block.Header blockHeader = 3; + Change.Block.Children blockChildren = 4; + Change.Block.Content.Page page = 5; + Change.Block.Content.Dashboard dashboard = 6; + Change.Block.Content.Media media = 7; + } +} + +message BlockChanges { + repeated BlocksListSingleChange changes = 1; +} \ No newline at end of file diff --git a/pb/protos/commands.proto b/pb/protos/commands.proto new file mode 100644 index 000000000..fd4171b8d --- /dev/null +++ b/pb/protos/commands.proto @@ -0,0 +1,424 @@ +syntax="proto3"; +package anytype; +option go_package = "pb"; + +import "models.proto"; +import "changes.proto"; + +message Rpc { + message Block { + message History { + message Move { + message Request { + string id = 1; + string contextBlockId = 2; + bool moveForward = 3; + } + + message Response { + Error error = 1; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + CAN_NOT_MOVE = 3; + // ... + } + } + } + } + } + + message Open { + message Request { + string id = 1; + } + + message Response { + Error error = 1; + Model.Block.Header blockHeader = 2; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + } + } + } + } + + message Create { + message Request { + Model.Block.Header.Type type = 1; + string contextBlockId = 2; + } + + message Response { + Error error = 1; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + } + } + } + } + + message Update { + message Request { + BlockChanges changes = 1; + } + + message Response { + Error error = 1; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + } + } + } + } + } + + message Wallet { + message Create { + /** + * Front-end-to-middleware request to create a new wallet + */ + message Request { + string rootPath = 1; // Path to a wallet directory + } + + /** + * Middleware-to-front-end response, that can contain mnemonic of a created account and a NULL error or an empty mnemonic and a non-NULL error + */ + message Response { + Error error = 1; + string mnemonic = 2; // Mnemonic of a new account (sequence of words, divided by spaces) + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; // No error; mnemonic should be non-empty + UNKNOWN_ERROR = 1; // Any other errors + BAD_INPUT = 2; // Root path is wrong + + FAILED_TO_CREATE_LOCAL_REPO = 101; + // ... + } + } + } + } + + message Recover { + /** + * Front end to middleware request-to-recover-a wallet with this mnemonic and a rootPath + */ + message Request { + string rootPath = 1; // Path to a wallet directory + string mnemonic = 2; // Mnemonic of a wallet to recover + } + + /** + * Middleware-to-front-end response, that can contain a NULL error or a non-NULL error + */ + message Response { + Error error = 1; // Error while trying to recover a wallet + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; // No error; wallet successfully recovered + UNKNOWN_ERROR = 1; // Any other errors + BAD_INPUT = 2; // Root path or mnemonic is wrong + + FAILED_TO_CREATE_LOCAL_REPO = 101; + } + } + } + } + } + + message Account { + message Create { + /** + * Front end to middleware request-to-create-an account + */ + message Request { + string name = 1; // Account name + oneof avatar { + string avatarLocalPath = 2; // Path to an image, that will be used as an avatar of this account + string avatarColor = 3; // Avatar color as an alternative for avatar image + } + } + + /** + * Middleware-to-front-end response for an account creation request, that can contain a NULL error and created account or a non-NULL error and an empty account + */ + message Response { + Error error = 1; // Error while trying to create an account + Model.Account account = 2; // A newly created account; In case of a failure, i.e. error is non-NULL, the account model should contain empty/default-value fields + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; // No error; Account should be non-empty + UNKNOWN_ERROR = 1; // Any other errors + BAD_INPUT = 2; // Avatar or name is not correct + + ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE = 101; + ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME = 102; + ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR = 103; + } + } + } + } + + message Recover { + /** + * Front end to middleware request-to-start-search of an accounts for a recovered mnemonic. + * Each of an account that would be found will come with an AccountAdd event + */ + message Request {} + + /** + * Middleware-to-front-end response to an account recover request, that can contain a NULL error and created account or a non-NULL error and an empty account + */ + message Response { + Error error = 1; // Error while trying to recover an account + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; // No error; + UNKNOWN_ERROR = 1; // Any other errors + BAD_INPUT = 2; + + NO_ACCOUNTS_FOUND = 101; + NEED_TO_RECOVER_WALLET_FIRST = 102; + FAILED_TO_CREATE_LOCAL_REPO = 103; + LOCAL_REPO_EXISTS_BUT_CORRUPTED = 104; + FAILED_TO_RUN_NODE = 105; + WALLET_RECOVER_NOT_PERFORMED = 106; + } + } + } + } + + message Select { + /** + * Front end to middleware request-to-launch-a specific account using account id and a root path + * User can select an account from those, that came with an AccountAdd events + */ + message Request { + string id = 1; // Id of a selected account + string rootPath = 2; // Root path is optional, set if this is a first request + } + + /** + * Middleware-to-front-end response for an account select request, that can contain a NULL error and selected account or a non-NULL error and an empty account + */ + message Response { + Error error = 1; // Error while trying to launch/select an account + Model.Account account = 2; // Selected account + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; // No error + UNKNOWN_ERROR = 1; // Any other errors + BAD_INPUT = 2; // Id or root path is wrong + + FAILED_TO_CREATE_LOCAL_REPO = 101; + LOCAL_REPO_EXISTS_BUT_CORRUPTED = 102; + FAILED_TO_RUN_NODE = 103; + FAILED_TO_FIND_ACCOUNT_INFO = 104; + LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET = 105; + } + } + } + } + } + + message Version { + message Get { + message Request {} + + message Response { + Error error = 1; + string version = 2; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + VERSION_IS_EMPTY = 3; + + NOT_FOUND = 101; + TIMEOUT = 102; + } + } + } + } + } + + message Log { + message Send { + message Request { + string message = 1; + Level level = 2; + + enum Level { + DEBUG = 0; + ERROR = 1; + FATAL = 2; + INFO = 3; + PANIC = 4; + WARNING = 5; + } + } + + message Response { + Error error = 1; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + + NOT_FOUND = 101; + TIMEOUT = 102; + } + } + } + } + } + + message Ipfs { + message Get { + message File { + message Request { + string id = 1; + } + + message Response { + Error error = 1; + bytes data = 2; + string media = 3; + string name = 4; + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + + NOT_FOUND = 101; + TIMEOUT = 102; + } + } + } + } + } + } + + message Image { + message Get { + message Blob { + message Request { + string id = 1; + Model.Image.Size size = 2; + } + + message Response { + Error error = 1; + bytes blob = 2; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + + NOT_FOUND = 101; + TIMEOUT = 102; + } + } + } + } + + message File { + message Request { + string id = 1; + Model.Image.Size size = 2; + } + + message Response { + Error error = 1; + string localPath = 2; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + + NOT_FOUND = 101; + TIMEOUT = 102; + } + } + } + } + } + } +} diff --git a/pb/protos/edit.proto b/pb/protos/edit.proto deleted file mode 100644 index 156dec3ae..000000000 --- a/pb/protos/edit.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax="proto3"; -package anytype; -option go_package = "pb"; - -import "block.proto"; -import "account.proto"; - -message UserBlockTextRange { - Account account = 1; - string blockId = 2; - Range range = 3; -} - -message UserBlockJoin { - Account account = 1; -} - -message UserBlockLeft { - Account account = 1; -} - -message UserBlockSelectRange { - Account account = 1; - repeated string blockIdsArray = 2; -} - -message UserBlockFocus { - Account account = 1; - string blockId = 2; -} diff --git a/pb/protos/event.proto b/pb/protos/event.proto deleted file mode 100644 index 54530c67b..000000000 --- a/pb/protos/event.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax="proto3"; -package anytype; -option go_package = "pb"; - -import "account.proto"; -import "block.proto"; - -message Event { - oneof message { - // show wallet's accounts that were loaded from local or remote source - AccountShow accountShow = 1; - BlockShow blockShow = 2; - BlockUpdate blockUpdate = 3; - BlockCreate blockCreate = 4; - - // unit was rearranged. Need to update the position - // UnitMoved unitMoved = 104; - - // unit was renamed or icon was changed - //UnitRenamed unitRenamed = 105; - - } -} diff --git a/pb/protos/events.proto b/pb/protos/events.proto new file mode 100644 index 000000000..bae4b3b66 --- /dev/null +++ b/pb/protos/events.proto @@ -0,0 +1,105 @@ +syntax="proto3"; +package anytype; +option go_package = "pb"; + +import "models.proto"; +import "changes.proto"; + +message Event { + oneof message { + Account.Show accountShow = 1; // show wallet's accounts that were loaded from local or remote source + Block.Show blockShow = 2; + Block.Update blockUpdate = 3; + Block.Create blockCreate = 4; + + User.Block.TextRange userBlockTextRange = 5; + User.Block.Join userBlockJoin = 6; + User.Block.Left userBlockLeft = 7; + User.Block.SelectRange userBlockSelectRange = 8; + + Block.FilesUpload filesUpload = 9; + } + + message Account { + /** + * Message, that will be sent to the front on each account found after an AccountRecoverRequest + */ + message Show { + int64 index = 1; // Number of an account in an all found accounts list + Model.Account account = 2; // An Account, that has been found for the mnemonic + } + } + + message Block { + message Show { + Model.Block block = 1; + } + + message Update { + BlockChanges changes = 1; + } + + message Create { + Model.Block block = 1; + } + + /** + * Middleware to front end event message, that will be sent on one of this scenarios: + * Precondition: user A opened a block + * 1. User A drops a set of files/pictures/videos + * 2. User A creates a MediaBlock and drops a single media, that corresponds to its type. + */ + message FilesUpload { + repeated string filePath = 1; // filepaths to the files + string blockId = 2; // if empty => create new blocks + } + } + + message User { + message Block { + + /** + * Middleware to front end event message, that will be sent in this scenario: + * Precondition: user A opened a block + * 1. User B opens the same block + * 2. User A receives a message about p.1 + */ + message Join { + Account account = 1; // Account of the user, that opened a block + } + + /** + * Middleware to front end event message, that will be sent in this scenario: + * Precondition: user A and user B opened the same block + * 1. User B closes the block + * 2. User A receives a message about p.1 + */ + message Left { + Account account = 1; // Account of the user, that left the block + } + + /** + * Middleware to front end event message, that will be sent in this scenario: + * Precondition: user A and user B opened the same block + * 1. User B sets cursor or selects a text region into a text block + * 2. User A receives a message about p.1 + */ + message TextRange { + Account account = 1; // Account of the user, that selected a text + string blockId = 2; // Id of the text block, that have a selection + Model.Range range = 3; // Range of the selection + } + + /** + * Middleware to front end event message, that will be sent in this scenario: + * Precondition: user A and user B opened the same block + * 1. User B selects some inner blocks + * 2. User A receives a message about p.1 + */ + message SelectRange { + Account account = 1; // Account of the user, that selected blocks + repeated string blockIdsArray = 2; // Ids of selected blocks. + } + } + } +} diff --git a/pb/protos/file.proto b/pb/protos/file.proto deleted file mode 100644 index a870e3187..000000000 --- a/pb/protos/file.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax="proto3"; -package anytype; -option go_package = "pb"; - -enum ImageSize { - LARGE = 0; - SMALL = 1; - THUMB = 2; -} - -message Image { - string id = 1; - repeated ImageSize sizes = 2; -} - -enum VideoSize { - SD_360p = 0; - SD_480p = 1; - HD_720p = 2; - HD_1080p = 3; - UHD_1440p = 4; - UHD_2160p = 5; -} - -message Video { - string id = 1; - repeated VideoSize sizes = 2; -} - -message IpfsGetFileRequest { - string id = 1; -} - -message IpfsGetFileResponse { - Error error = 1; - bytes data = 2; - string media = 3; - string name = 4; - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - - NOT_FOUND = 101; - TIMEOUT = 102; - } - } -} - -message ImageGetBlobRequest { - string id = 1; - ImageSize size = 2; -} - -message ImageGetBlobResponse { - Error error = 1; - bytes blob = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - - NOT_FOUND = 101; - TIMEOUT = 102; - } - } -} - -message ImageGetFileRequest { - string id = 1; - ImageSize size = 2; -} - -message ImageGetFileResponse { - Error error = 1; - string localPath = 2; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - // ... - - NOT_FOUND = 101; - TIMEOUT = 102; - } - } -} diff --git a/pb/protos/misc.proto b/pb/protos/misc.proto deleted file mode 100644 index 09cdbdc2c..000000000 --- a/pb/protos/misc.proto +++ /dev/null @@ -1,93 +0,0 @@ -syntax = "proto3"; -package anytype; -option go_package = "pb"; - -message VersionGetRequest {} - -message VersionGetResponse { - Error error = 1; - // version is generate by git describe - string version = 2; - string details = 3; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - VERSION_IS_EMPTY = 3; - - NOT_FOUND = 101; - TIMEOUT = 102; - } - } -} - -message LogSendRequest { - string message = 1; - Level level = 2; - - enum Level { - DEBUG = 0; - ERROR = 1; - FATAL = 2; - INFO = 3; - PANIC = 4; - WARNING = 5; - } -} - -message LogSendResponse { - Error error = 1; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - - NOT_FOUND = 101; - TIMEOUT = 102; - } - } -} - -message LinkPreviewRequest { - string url = 1; -} - -message LinkPreviewResponse { - Error error = 1; - string title = 2; - string description = 3; - string imageUrl = 4; - string url = 5; - string faviconUrl = 6; - Type type = 7; - - message Error { - Code code = 1; - string description = 2; - - enum Code { - NULL = 0; - UNKNOWN_ERROR = 1; - BAD_INPUT = 2; - - TIMEOUT = 102; - } - } - - enum Type { - PAGE = 0; - IMAGE = 1; - TEXT = 2; - UNEXPECTED = 3; - } -} diff --git a/pb/protos/models.proto b/pb/protos/models.proto new file mode 100644 index 000000000..5261d4c24 --- /dev/null +++ b/pb/protos/models.proto @@ -0,0 +1,272 @@ +syntax = "proto3"; +package anytype; +option go_package = "pb"; + +message Model { + message Block { + Header header = 1; + repeated string children = 2; + + oneof content { + Content.Dashboard dashboard = 11; + Content.Page page = 12; + Content.Dataview dataview = 13; + + Content.Text text = 14; + Content.Media media = 15; + Content.Layout layout = 16; + Content.Div div = 17; + } + + message Header { + string id = 1; + Type type = 2; + Struct fields = 3; + Permissions permissions = 4; + + message Permissions { + bool read = 1; + bool edit = 2; + bool remove = 3; + bool drag = 4; + bool dropOn = 5; + } + + enum Type { + DASHBOARD = 0; + PAGE = 1; + DATAVIEW = 2; + + TEXT = 3; + FILE = 4; + PICTURE = 5; + VIDEO = 6; + BOOKMARK = 7; + + LAYOUT = 8; + DIV = 9; + } + } + + message Content { + message Layout { + Style style = 1; + + enum Style { + ROW = 0; + COLUMN = 1; + } + } + + message Div { + } + + message Dashboard { + enum Style { + MAIN_SCREEN = 0; + // ... + } + + Style style = 1; + repeated Header headers = 2; + } + + message Dataview { + // ... + } + + message Text { + enum Style { + p = 0; + h1 = 1; + h2 = 2; + h3 = 3; + h4 = 4; + quote = 5; + code = 6; + } + + enum MarkerType { + none = 0; + number = 1; + bullet = 2; + } + + message Marks { + repeated Mark marks = 1; + } + + message Mark { + + enum Type { + STRIKETHROUGH = 0; + KEYBOARD = 1; + ITALIC = 2; + BOLD = 3; + LINK = 4; + } + + Range range = 1; + Type type = 2; + string param = 3; // link, color, etc + } + + string text = 1; + Style style = 2; + Marks marksList = 3; + + bool toggleable = 4; + MarkerType markerType = 5; + + bool checkable = 6; + bool checked = 7; + } + + message Media { + bytes content = 1; + State state = 2; + + oneof preview { + VideoPreview video = 101; + ImagePreview image = 102; + FilePreview file = 103; + } + + message VideoPreview { + bytes thumbnail = 1; + string name = 2; + int32 width = 3; + } + + message ImagePreview { + bytes thumbnail = 1; + string name = 2; + int32 width = 3; + } + + message FilePreview { + string name = 1; + string icon = 2; + } + + enum State { + EMPTY = 0; + UPLOADING = 1; + PREVIEW = 2; + DOWNLOADING = 3; + DONE = 4; + } + } + + message Page { + enum Style { + EMPTY = 0; + TASK = 1; + BOOKMARK = 2; + SET = 3; + // ... + } + + Style style = 1; + } + } + } + + message Range { + int32 from = 1; + int32 to = 2; + } + + message Struct { + // Unordered map of dynamically typed values. + map fields = 1; + + // `Value` represents a dynamically typed value which can be either + // null, a number, a string, a boolean, a recursive struct value, or a + // list of values. A producer of value is expected to set one of that + // variants, absence of any variant indicates an error. + message Value { + oneof kind { // The kind of value. + NullValue null_value = 1; // Represents a null value. + double number_value = 2; // Represents a double value. + string string_value = 3; // Represents a string value. + bool bool_value = 4; // Represents a boolean value. + Struct struct_value = 5; // Represents a structured value. + ListValue list_value = 6; // Represents a repeated `Value`. + } + } + + // `NullValue` is a singleton enumeration to represent the null value for the + enum NullValue { + NULL_VALUE = 0; + } + + // `ListValue` is a wrapper around a repeated field of values. + message ListValue { + repeated Value values = 1; + } + } + + /** + * Contains basic information about user account + */ + message Account { + string id = 1; // User's thread id + string name = 2; // User name, that associated with this account + Avatar avatar = 3; // Avatar of a user's account + + /** + * Avatar of a user's account. It could be an image or color + */ + message Avatar { + oneof avatar { + Image image = 1; // Image of the avatar. Contains hash and size + string color = 2; // Color of the avatar, if no image + } + } + } + + message Image { + string id = 1; + repeated Size sizes = 2; + + enum Size { + LARGE = 0; + SMALL = 1; + THUMB = 2; + } + } + + message Video { + string id = 1; + repeated Size sizes = 2; + + enum Size { + SD_360p = 0; + SD_480p = 1; + HD_720p = 2; + HD_1080p = 3; + UHD_1440p = 4; + UHD_2160p = 5; + } + } + + message Preview { + message Link { + string title = 1; + string description = 2; + string imageUrl = 3; + string url = 4; + string faviconUrl = 5; + Type type = 6; + + enum Type { + PAGE = 0; + IMAGE = 1; + TEXT = 2; + UNEXPECTED = 3; + } + } + } +} + diff --git a/pb/protos/service/service.proto b/pb/protos/service/service.proto index a9d2664d0..7366d15a0 100644 --- a/pb/protos/service/service.proto +++ b/pb/protos/service/service.proto @@ -2,26 +2,23 @@ syntax="proto3"; package anytype; option go_package = "lib"; -import "account.proto"; -import "file.proto"; -import "misc.proto"; -import "block.proto"; +import "commands.proto"; service ClientCommands { - rpc WalletCreate (anytype.WalletCreateRequest) returns (anytype.WalletCreateResponse); - rpc WalletRecover (anytype.WalletRecoverRequest) returns (anytype.WalletRecoverResponse); - rpc AccountRecover (anytype.AccountRecoverRequest) returns (anytype.AccountRecoverResponse); - rpc AccountCreate (anytype.AccountCreateRequest) returns (anytype.AccountCreateResponse); - rpc AccountSelect (anytype.AccountSelectRequest) returns (anytype.AccountSelectResponse); + rpc WalletCreate (anytype.Rpc.Wallet.Create.Request) returns (anytype.Rpc.Wallet.Create.Response); + rpc WalletRecover (anytype.Rpc.Wallet.Recover.Request) returns (anytype.Rpc.Wallet.Recover.Response); + rpc AccountRecover (anytype.Rpc.Account.Recover.Request) returns (anytype.Rpc.Account.Recover.Response); + rpc AccountCreate (anytype.Rpc.Account.Create.Request) returns (anytype.Rpc.Account.Create.Response); + rpc AccountSelect (anytype.Rpc.Account.Select.Request) returns (anytype.Rpc.Account.Select.Response); - rpc ImageGetBlob (anytype.ImageGetBlobRequest) returns (anytype.ImageGetBlobResponse); + rpc ImageGetBlob (anytype.Rpc.Image.Get.Blob.Request) returns (anytype.Rpc.Image.Get.Blob.Response); - rpc VersionGet (VersionGetRequest) returns (VersionGetResponse); - rpc LogSend (LogSendRequest) returns (LogSendResponse); + rpc VersionGet (anytype.Rpc.Version.Get.Request) returns (anytype.Rpc.Version.Get.Response); + rpc LogSend (anytype.Rpc.Log.Send.Request) returns (anytype.Rpc.Log.Send.Response); - rpc BlockOpen (BlockOpenRequest) returns (BlockOpenResponse); - rpc BlockCreate (BlockCreateRequest) returns (BlockCreateResponse); - rpc BlockUpdate (BlockUpdateRequest) returns (BlockUpdateResponse); - - rpc LinkPreview (LinkPreviewRequest) returns (LinkPreviewResponse); + rpc BlockOpen (anytype.Rpc.Block.Open.Request) returns (anytype.Rpc.Block.Open.Response); + rpc BlockCreate (anytype.Rpc.Block.Create.Request) returns (anytype.Rpc.Block.Create.Response); + rpc BlockUpdate (anytype.Rpc.Block.Update.Request) returns (anytype.Rpc.Block.Update.Response); + rpc BlockHistoryMove (anytype.Rpc.Block.History.Move.Request) returns (anytype.Rpc.Block.History.Move.Response); + // rpc BlockFilesUpload (Block Rpc.History.Move.Request) returns (BlockRpc..History Move.Response); } diff --git a/pb/protos/struct.proto b/pb/protos/struct.proto deleted file mode 100644 index 1fb063f24..000000000 --- a/pb/protos/struct.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax="proto3"; -package anytype; -option go_package = "pb"; - - -message Struct { - // Unordered map of dynamically typed values. - map fields = 1; -} - -// `Value` represents a dynamically typed value which can be either -// null, a number, a string, a boolean, a recursive struct value, or a -// list of values. A producer of value is expected to set one of that -// variants, absence of any variant indicates an error. -// -// The JSON representation for `Value` is JSON value. -message Value { - // The kind of value. - oneof kind { - // Represents a null value. - NullValue null_value = 1; - // Represents a double value. - double number_value = 2; - // Represents a string value. - string string_value = 3; - // Represents a boolean value. - bool bool_value = 4; - // Represents a structured value. - Struct struct_value = 5; - // Represents a repeated `Value`. - ListValue list_value = 6; - } -} - -// `NullValue` is a singleton enumeration to represent the null value for the -// `Value` type union. -// -// The JSON representation for `NullValue` is JSON `null`. -enum NullValue { - // Null value. - NULL_VALUE = 0; -} - -// `ListValue` is a wrapper around a repeated field of values. -// -// The JSON representation for `ListValue` is JSON array. -message ListValue { - // Repeated field of dynamically typed values. - repeated Value values = 1; -} \ No newline at end of file diff --git a/pb/struct.pb.go b/pb/struct.pb.go deleted file mode 100644 index 37aa786b7..000000000 --- a/pb/struct.pb.go +++ /dev/null @@ -1,1230 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: struct.proto - -package pb - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// `NullValue` is a singleton enumeration to represent the null value for the -// `Value` type union. -// -// The JSON representation for `NullValue` is JSON `null`. -type NullValue int32 - -const ( - // Null value. - NullValue_NULL_VALUE NullValue = 0 -) - -var NullValue_name = map[int32]string{ - 0: "NULL_VALUE", -} - -var NullValue_value = map[string]int32{ - "NULL_VALUE": 0, -} - -func (x NullValue) String() string { - return proto.EnumName(NullValue_name, int32(x)) -} - -func (NullValue) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0605f6bcb0ae6db1, []int{0} -} - -type Struct struct { - // Unordered map of dynamically typed values. - Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *Struct) Reset() { *m = Struct{} } -func (m *Struct) String() string { return proto.CompactTextString(m) } -func (*Struct) ProtoMessage() {} -func (*Struct) Descriptor() ([]byte, []int) { - return fileDescriptor_0605f6bcb0ae6db1, []int{0} -} -func (m *Struct) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Struct.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Struct) XXX_Merge(src proto.Message) { - xxx_messageInfo_Struct.Merge(m, src) -} -func (m *Struct) XXX_Size() int { - return m.Size() -} -func (m *Struct) XXX_DiscardUnknown() { - xxx_messageInfo_Struct.DiscardUnknown(m) -} - -var xxx_messageInfo_Struct proto.InternalMessageInfo - -func (m *Struct) GetFields() map[string]*Value { - if m != nil { - return m.Fields - } - return nil -} - -// `Value` represents a dynamically typed value which can be either -// null, a number, a string, a boolean, a recursive struct value, or a -// list of values. A producer of value is expected to set one of that -// variants, absence of any variant indicates an error. -// -// The JSON representation for `Value` is JSON value. -type Value struct { - // The kind of value. - // - // Types that are valid to be assigned to Kind: - // *Value_NullValue - // *Value_NumberValue - // *Value_StringValue - // *Value_BoolValue - // *Value_StructValue - // *Value_ListValue - Kind isValue_Kind `protobuf_oneof:"kind"` -} - -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { - return fileDescriptor_0605f6bcb0ae6db1, []int{1} -} -func (m *Value) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Value.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Value.Merge(m, src) -} -func (m *Value) XXX_Size() int { - return m.Size() -} -func (m *Value) XXX_DiscardUnknown() { - xxx_messageInfo_Value.DiscardUnknown(m) -} - -var xxx_messageInfo_Value proto.InternalMessageInfo - -type isValue_Kind interface { - isValue_Kind() - MarshalTo([]byte) (int, error) - Size() int -} - -type Value_NullValue struct { - NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=anytype.NullValue,oneof" json:"null_value,omitempty"` -} -type Value_NumberValue struct { - NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof" json:"number_value,omitempty"` -} -type Value_StringValue struct { - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` -} -type Value_BoolValue struct { - BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` -} -type Value_StructValue struct { - StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof" json:"struct_value,omitempty"` -} -type Value_ListValue struct { - ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof" json:"list_value,omitempty"` -} - -func (*Value_NullValue) isValue_Kind() {} -func (*Value_NumberValue) isValue_Kind() {} -func (*Value_StringValue) isValue_Kind() {} -func (*Value_BoolValue) isValue_Kind() {} -func (*Value_StructValue) isValue_Kind() {} -func (*Value_ListValue) isValue_Kind() {} - -func (m *Value) GetKind() isValue_Kind { - if m != nil { - return m.Kind - } - return nil -} - -func (m *Value) GetNullValue() NullValue { - if x, ok := m.GetKind().(*Value_NullValue); ok { - return x.NullValue - } - return NullValue_NULL_VALUE -} - -func (m *Value) GetNumberValue() float64 { - if x, ok := m.GetKind().(*Value_NumberValue); ok { - return x.NumberValue - } - return 0 -} - -func (m *Value) GetStringValue() string { - if x, ok := m.GetKind().(*Value_StringValue); ok { - return x.StringValue - } - return "" -} - -func (m *Value) GetBoolValue() bool { - if x, ok := m.GetKind().(*Value_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (m *Value) GetStructValue() *Struct { - if x, ok := m.GetKind().(*Value_StructValue); ok { - return x.StructValue - } - return nil -} - -func (m *Value) GetListValue() *ListValue { - if x, ok := m.GetKind().(*Value_ListValue); ok { - return x.ListValue - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Value) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Value_NullValue)(nil), - (*Value_NumberValue)(nil), - (*Value_StringValue)(nil), - (*Value_BoolValue)(nil), - (*Value_StructValue)(nil), - (*Value_ListValue)(nil), - } -} - -// `ListValue` is a wrapper around a repeated field of values. -// -// The JSON representation for `ListValue` is JSON array. -type ListValue struct { - // Repeated field of dynamically typed values. - Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` -} - -func (m *ListValue) Reset() { *m = ListValue{} } -func (m *ListValue) String() string { return proto.CompactTextString(m) } -func (*ListValue) ProtoMessage() {} -func (*ListValue) Descriptor() ([]byte, []int) { - return fileDescriptor_0605f6bcb0ae6db1, []int{2} -} -func (m *ListValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListValue.Merge(m, src) -} -func (m *ListValue) XXX_Size() int { - return m.Size() -} -func (m *ListValue) XXX_DiscardUnknown() { - xxx_messageInfo_ListValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ListValue proto.InternalMessageInfo - -func (m *ListValue) GetValues() []*Value { - if m != nil { - return m.Values - } - return nil -} - -func init() { - proto.RegisterEnum("anytype.NullValue", NullValue_name, NullValue_value) - proto.RegisterType((*Struct)(nil), "anytype.Struct") - proto.RegisterMapType((map[string]*Value)(nil), "anytype.Struct.FieldsEntry") - proto.RegisterType((*Value)(nil), "anytype.Value") - proto.RegisterType((*ListValue)(nil), "anytype.ListValue") -} - -func init() { proto.RegisterFile("struct.proto", fileDescriptor_0605f6bcb0ae6db1) } - -var fileDescriptor_0605f6bcb0ae6db1 = []byte{ - // 356 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x31, 0x4f, 0xc2, 0x40, - 0x14, 0xc7, 0x7b, 0x05, 0xaa, 0x7d, 0x25, 0x48, 0x6e, 0x22, 0x62, 0x6a, 0x83, 0xc6, 0x34, 0x0e, - 0x1d, 0xa8, 0x83, 0x71, 0x93, 0x04, 0x83, 0x49, 0xc3, 0x50, 0x03, 0x83, 0x0b, 0xa1, 0x50, 0x4d, - 0xc3, 0xd9, 0x92, 0xf6, 0x6a, 0xd2, 0x6f, 0xe0, 0xe8, 0xec, 0x27, 0x72, 0x64, 0x74, 0x34, 0xf0, - 0x45, 0xcc, 0xdd, 0xb5, 0x87, 0x61, 0xeb, 0xfb, 0xbf, 0xdf, 0x7b, 0xaf, 0xff, 0x7f, 0x0b, 0xcd, - 0x8c, 0xa6, 0xf9, 0x82, 0x3a, 0xeb, 0x34, 0xa1, 0x09, 0x3e, 0x9a, 0xc7, 0x05, 0x2d, 0xd6, 0x61, - 0xef, 0x03, 0x81, 0xf6, 0xc4, 0x3b, 0xd8, 0x05, 0xed, 0x25, 0x0a, 0xc9, 0x32, 0xeb, 0x20, 0xab, - 0x66, 0x1b, 0xfd, 0xae, 0x53, 0x42, 0x8e, 0x00, 0x9c, 0x07, 0xde, 0x1d, 0xc6, 0x34, 0x2d, 0xfc, - 0x12, 0x3d, 0x7d, 0x04, 0xe3, 0x9f, 0x8c, 0xdb, 0x50, 0x5b, 0x85, 0x45, 0x07, 0x59, 0xc8, 0xd6, - 0x7d, 0xf6, 0x88, 0x2f, 0xa1, 0xf1, 0x3e, 0x27, 0x79, 0xd8, 0x51, 0x2d, 0x64, 0x1b, 0xfd, 0x96, - 0x5c, 0x3a, 0x65, 0xaa, 0x2f, 0x9a, 0x77, 0xea, 0x2d, 0xea, 0x7d, 0xa9, 0xd0, 0xe0, 0x22, 0x76, - 0x01, 0xe2, 0x9c, 0x90, 0x99, 0x18, 0x64, 0xcb, 0x5a, 0x7d, 0x2c, 0x07, 0xc7, 0x39, 0x21, 0x9c, - 0x1b, 0x29, 0xbe, 0x1e, 0x57, 0x05, 0xbe, 0x80, 0x66, 0x9c, 0xbf, 0x05, 0x61, 0x3a, 0xdb, 0xdf, - 0x43, 0x23, 0xc5, 0x37, 0x84, 0x2a, 0xa1, 0x8c, 0xa6, 0x51, 0xfc, 0x5a, 0x42, 0x35, 0xf6, 0xa2, - 0x0c, 0x12, 0xaa, 0x80, 0xce, 0x01, 0x82, 0x24, 0xa9, 0xce, 0xd7, 0x2d, 0x64, 0x1f, 0xb3, 0x53, - 0x4c, 0x13, 0xc0, 0x4d, 0x95, 0x66, 0x89, 0x34, 0xb8, 0xb5, 0x93, 0x83, 0xbc, 0xca, 0xb5, 0xf9, - 0x82, 0x4a, 0x57, 0x24, 0xca, 0xaa, 0x19, 0x8d, 0xcf, 0xec, 0x5d, 0x79, 0x51, 0x46, 0xa5, 0x2b, - 0x52, 0x15, 0x03, 0x0d, 0xea, 0xab, 0x28, 0x5e, 0xf6, 0x5c, 0xd0, 0x25, 0x81, 0xaf, 0x40, 0xe3, - 0x4b, 0xaa, 0x2f, 0x75, 0x18, 0x6a, 0xd9, 0xbd, 0xee, 0x82, 0x2e, 0xc3, 0xc2, 0x2d, 0x80, 0xf1, - 0xc4, 0xf3, 0x66, 0xd3, 0x7b, 0x6f, 0x32, 0x6c, 0x2b, 0x83, 0xb3, 0xef, 0xad, 0x89, 0x36, 0x5b, - 0x13, 0xfd, 0x6e, 0x4d, 0xf4, 0xb9, 0x33, 0x95, 0xcd, 0xce, 0x54, 0x7e, 0x76, 0xa6, 0xf2, 0xac, - 0xae, 0x83, 0x40, 0xe3, 0xff, 0x89, 0xfb, 0x17, 0x00, 0x00, 0xff, 0xff, 0x75, 0x2b, 0x51, 0xe3, - 0x37, 0x02, 0x00, 0x00, -} - -func (m *Struct) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Struct) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Struct) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Fields) > 0 { - for k := range m.Fields { - v := m.Fields[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintStruct(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintStruct(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Value) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Kind != nil { - { - size := m.Kind.Size() - i -= size - if _, err := m.Kind.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Value_NullValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_NullValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintStruct(dAtA, i, uint64(m.NullValue)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_NumberValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) - i-- - dAtA[i] = 0x11 - return len(dAtA) - i, nil -} -func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarintStruct(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - return len(dAtA) - i, nil -} -func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_StructValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.StructValue != nil { - { - size, err := m.StructValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Value_ListValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ListValue != nil { - { - size, err := m.ListValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *ListValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintStruct(dAtA []byte, offset int, v uint64) int { - offset -= sovStruct(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Struct) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Fields) > 0 { - for k, v := range m.Fields { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovStruct(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovStruct(uint64(len(k))) + l - n += mapEntrySize + 1 + sovStruct(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Kind != nil { - n += m.Kind.Size() - } - return n -} - -func (m *Value_NullValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovStruct(uint64(m.NullValue)) - return n -} -func (m *Value_NumberValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *Value_StringValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StringValue) - n += 1 + l + sovStruct(uint64(l)) - return n -} -func (m *Value_BoolValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *Value_StructValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StructValue != nil { - l = m.StructValue.Size() - n += 1 + l + sovStruct(uint64(l)) - } - return n -} -func (m *Value_ListValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ListValue != nil { - l = m.ListValue.Size() - n += 1 + l + sovStruct(uint64(l)) - } - return n -} -func (m *ListValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovStruct(uint64(l)) - } - } - return n -} - -func sovStruct(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStruct(x uint64) (n int) { - return sovStruct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Struct) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Struct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fields == nil { - m.Fields = make(map[string]*Value) - } - var mapkey string - var mapvalue *Value - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthStruct - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthStruct - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthStruct - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthStruct - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Value{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Fields[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Value) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) - } - var v NullValue - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= NullValue(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Kind = &Value_NullValue{v} - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = &Value_StringValue{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Kind = &Value_BoolValue{b} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Kind = &Value_StructValue{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ListValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Kind = &Value_ListValue{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, &Value{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStruct(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStruct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStruct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStruct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStruct - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStruct - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStruct - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStruct = fmt.Errorf("proto: unexpected end of group") -) diff --git a/util/linkpreview/linkpreview.go b/util/linkpreview/linkpreview.go index 3fc5ea562..9359fcd3c 100644 --- a/util/linkpreview/linkpreview.go +++ b/util/linkpreview/linkpreview.go @@ -27,14 +27,14 @@ const ( ) type LinkPreview interface { - Fetch(ctx context.Context, url string) (pb.LinkPreviewResponse, error) + Fetch(ctx context.Context, url string) (pb.ModelPreviewLink, error) } type linkPreview struct { bmPolicy *bluemonday.Policy } -func (l *linkPreview) Fetch(ctx context.Context, url string) (pb.LinkPreviewResponse, error) { +func (l *linkPreview) Fetch(ctx context.Context, url string) (pb.ModelPreviewLink, error) { rt := &proxyRoundTripper{RoundTripper: http.DefaultTransport} client := &http.Client{Transport: rt} og, err := opengraph.FetchWithContext(ctx, url, client) @@ -42,7 +42,7 @@ func (l *linkPreview) Fetch(ctx context.Context, url string) (pb.LinkPreviewResp if resp := rt.lastResponse; resp != nil && resp.StatusCode == http.StatusOK { return l.makeNonHtml(url, resp) } - return pb.LinkPreviewResponse{}, err + return pb.ModelPreviewLink{}, err } res := l.convertOGToInfo(og) if len(res.Description) == 0 { @@ -51,13 +51,13 @@ func (l *linkPreview) Fetch(ctx context.Context, url string) (pb.LinkPreviewResp return res, nil } -func (l *linkPreview) convertOGToInfo(og *opengraph.OpenGraph) (i pb.LinkPreviewResponse) { +func (l *linkPreview) convertOGToInfo(og *opengraph.OpenGraph) (i pb.ModelPreviewLink) { og.ToAbsURL() - i = pb.LinkPreviewResponse{ + i = pb.ModelPreviewLink{ Url: og.URL.String(), Title: og.Title, Description: og.Description, - Type: pb.LinkPreviewResponse_PAGE, + Type: pb.ModelPreviewLink_PAGE, FaviconUrl: og.Favicon, } if len(og.Image) != 0 { @@ -85,17 +85,17 @@ func (l *linkPreview) findContent(data []byte) (content string) { return } -func (l *linkPreview) makeNonHtml(url string, resp *http.Response) (i pb.LinkPreviewResponse, err error) { +func (l *linkPreview) makeNonHtml(url string, resp *http.Response) (i pb.ModelPreviewLink, err error) { ct := resp.Header.Get("Content-Type") i.Url = url i.Title = filepath.Base(url) if strings.HasPrefix(ct, "image/") { - i.Type = pb.LinkPreviewResponse_IMAGE + i.Type = pb.ModelPreviewLink_IMAGE i.ImageUrl = url } else if strings.HasPrefix(ct, "text/") { - i.Type = pb.LinkPreviewResponse_TEXT + i.Type = pb.ModelPreviewLink_TEXT } else { - i.Type = pb.LinkPreviewResponse_UNEXPECTED + i.Type = pb.ModelPreviewLink_UNEXPECTED } return } diff --git a/util/linkpreview/linkpreview_test.go b/util/linkpreview/linkpreview_test.go index 45babd772..c66508191 100644 --- a/util/linkpreview/linkpreview_test.go +++ b/util/linkpreview/linkpreview_test.go @@ -23,13 +23,13 @@ func TestLinkPreview_Fetch(t *testing.T) { info, err := lp.Fetch(ctx, ts.URL) require.NoError(t, err) - assert.Equal(t, pb.LinkPreviewResponse{ + assert.Equal(t, pb.ModelPreviewLink{ Url: ts.URL, FaviconUrl: ts.URL + "/favicon.ico", Title: "Title", Description: "Description", ImageUrl: "http://site.com/images/example.jpg", - Type: pb.LinkPreviewResponse_PAGE, + Type: pb.ModelPreviewLink_PAGE, }, info) }) @@ -40,13 +40,13 @@ func TestLinkPreview_Fetch(t *testing.T) { info, err := lp.Fetch(ctx, ts.URL) require.NoError(t, err) - assert.Equal(t, pb.LinkPreviewResponse{ + assert.Equal(t, pb.ModelPreviewLink{ Url: ts.URL, FaviconUrl: ts.URL + "/favicon.ico", Title: "Title", Description: "Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta...", ImageUrl: "http://site.com/images/example.jpg", - Type: pb.LinkPreviewResponse_PAGE, + Type: pb.ModelPreviewLink_PAGE, }, info) }) @@ -58,11 +58,11 @@ func TestLinkPreview_Fetch(t *testing.T) { lp := New() info, err := lp.Fetch(ctx, url) require.NoError(t, err) - assert.Equal(t, pb.LinkPreviewResponse{ + assert.Equal(t, pb.ModelPreviewLink{ Url: url, Title: "filename.jpg", ImageUrl: url, - Type: pb.LinkPreviewResponse_IMAGE, + Type: pb.ModelPreviewLink_IMAGE, }, info) }) @@ -74,10 +74,10 @@ func TestLinkPreview_Fetch(t *testing.T) { lp := New() info, err := lp.Fetch(ctx, url) require.NoError(t, err) - assert.Equal(t, pb.LinkPreviewResponse{ + assert.Equal(t, pb.ModelPreviewLink{ Url: url, Title: "filename.jpg", - Type: pb.LinkPreviewResponse_UNEXPECTED, + Type: pb.ModelPreviewLink_UNEXPECTED, }, info) }) }