From 1fda4c6e82a0b73b4165ae2343f7ec82566b66a1 Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Thu, 18 May 2023 11:28:24 +0200 Subject: [PATCH] feat: boostd index announce-latest --- api/api.go | 1 + api/proxy_gen.go | 13 +++++++++++++ build/openrpc/boost.json.gz | Bin 5503 -> 5557 bytes cmd/boostd/index.go | 25 +++++++++++++++++++++++++ documentation/en/api-v1-methods.md | 15 +++++++++++++++ indexprovider/wrapper.go | 9 +++++++++ node/impl/boost.go | 4 ++++ 7 files changed, 67 insertions(+) diff --git a/api/api.go b/api/api.go index cc067d49c..e5a6e562b 100644 --- a/api/api.go +++ b/api/api.go @@ -35,6 +35,7 @@ type Boost interface { // MethodGroup: Boost BoostIndexerAnnounceAllDeals(ctx context.Context) error //perm:admin + BoostIndexerAnnounceLatest(ctx context.Context) (cid.Cid, error) //perm:admin BoostOfflineDealWithData(ctx context.Context, dealUuid uuid.UUID, filePath string, delAfterImport bool) (*ProviderDealRejectionInfo, error) //perm:admin BoostDeal(ctx context.Context, dealUuid uuid.UUID) (*smtypes.ProviderDealState, error) //perm:admin BoostDealBySignedProposalCid(ctx context.Context, proposalCid cid.Cid) (*smtypes.ProviderDealState, error) //perm:admin diff --git a/api/proxy_gen.go b/api/proxy_gen.go index b51ec916a..bcc55b398 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -69,6 +69,8 @@ type BoostStruct struct { BoostIndexerAnnounceAllDeals func(p0 context.Context) error `perm:"admin"` + BoostIndexerAnnounceLatest func(p0 context.Context) (cid.Cid, error) `perm:"admin"` + BoostMakeDeal func(p0 context.Context, p1 smtypes.DealParams) (*ProviderDealRejectionInfo, error) `perm:"write"` BoostOfflineDealWithData func(p0 context.Context, p1 uuid.UUID, p2 string, p3 bool) (*ProviderDealRejectionInfo, error) `perm:"admin"` @@ -444,6 +446,17 @@ func (s *BoostStub) BoostIndexerAnnounceAllDeals(p0 context.Context) error { return ErrNotSupported } +func (s *BoostStruct) BoostIndexerAnnounceLatest(p0 context.Context) (cid.Cid, error) { + if s.Internal.BoostIndexerAnnounceLatest == nil { + return *new(cid.Cid), ErrNotSupported + } + return s.Internal.BoostIndexerAnnounceLatest(p0) +} + +func (s *BoostStub) BoostIndexerAnnounceLatest(p0 context.Context) (cid.Cid, error) { + return *new(cid.Cid), ErrNotSupported +} + func (s *BoostStruct) BoostMakeDeal(p0 context.Context, p1 smtypes.DealParams) (*ProviderDealRejectionInfo, error) { if s.Internal.BoostMakeDeal == nil { return nil, ErrNotSupported diff --git a/build/openrpc/boost.json.gz b/build/openrpc/boost.json.gz index 5bcd3ae20f834fd87c8060988d0e1441745aa581..846a724413230984352c6b494055f5a3e16643de 100644 GIT binary patch delta 5527 zcmV;I6=>@JDzz(+7Jtf^G_R(Qnf;+nS;)7A?QLMc?_20x6kAEOb!1~JrJI4xR>Sy|e3o zxgKig*CXA~@1f@-2eTf>t==oo?C5JlUqCWaGagj?q(alA2P zf1~eEH*^d7riWa@0e$)MW#)Xw(d*vrAZF7ROc6NTQeO@-~(w5`M-wd zb~IpF9`yazIsf-SdjTe>wdrSQ(DNMcKzsa*KNB?7{MHB)=wV=|@zZ|$O~c6MEk6?v zlBI{Wml%Fa!GAn3wAY^Z-XY_q>pC8R7VWX7e+8Z7FL~j%Dc%R4@%l6V^5u(e=>BrC z0NzSJ(?86i2Q}b94Ld|zL81Y?(oAQufSCB&)bTVjN4~}wv3p}vkQ?~Tz$9&5kmgy`GrvdxDay^Gm z`r(AK)#1c;CWi~)6X+cR7ah8u^RW8A8N{ub^FLSJ3^y_`3_77df$9&K3MfYZ$KtJ{|+wPf1HP}?sDZU+(>Pb~?0?SVuR(9V}& z#@OW&`owcq<2mrGl2SniMkXQn5+88MAQTKTh+-j8LOSH2x^qbpP_~kV%iC)Az<*xC z%GRxjJKittEO!JCV=^n!gSP#1(|+ezf%e}Fx1jhpLjj#LuRLtQDC~x)TsHM+62OpBu(=V~-v~m?49O?7TMkFa*ydtfJpSm9$<9f`l4c@+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