Skip to content

Commit 4a95fe5

Browse files
committed
fix: inline the command strings
1 parent 330226b commit 4a95fe5

23 files changed

Lines changed: 23 additions & 65 deletions

File tree

commands/access/request.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ import "github.com/fil-forge/libforge/commands"
99
// invocation.
1010
const RequestMetaKey = "accessRequest"
1111

12-
const RequestCommand = "/access/request"
13-
1412
// Request can be invoked by an agent to request set of capabilities from the
1513
// account.
16-
var Request = commands.MustParse[*RequestArguments](RequestCommand)
14+
var Request = commands.MustParse[*RequestArguments]("/access/request")
1715

1816
const (
1917
InvalidAuthorizationAccountErrorName = "InvalidAuthorizationAccount"

commands/assert/equals.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ package assert
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const EqualsCommand = "/assert/equals"
8-
97
type EqualsOK = commands.Unit
108

119
// Equals claims data is referred to by another CID e.g CAR CID & Piece CID
12-
var Equals = commands.MustParse[*EqualsArguments](EqualsCommand)
10+
var Equals = commands.MustParse[*EqualsArguments]("/assert/equals")

commands/assert/index.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ package assert
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const IndexCommand = "/assert/index"
8-
97
type IndexOK = commands.Unit
108

119
// Index claims that a content graph can be found in blob(s) that are identified
1210
// and indexed in the given index CID.
13-
var Index = commands.MustParse[*IndexArguments](IndexCommand)
11+
var Index = commands.MustParse[*IndexArguments]("/assert/index")

commands/assert/location.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ package assert
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const LocationCommand = "/assert/location"
8-
97
type LocationOK = commands.Unit
108

11-
var Location = commands.MustParse[*LocationArguments](LocationCommand)
9+
var Location = commands.MustParse[*LocationArguments]("/assert/location")

commands/blob/accept.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ package blob
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const AcceptCommand = "/blob/accept"
8-
9-
var Accept = commands.MustParse[*AcceptArguments](AcceptCommand)
7+
var Accept = commands.MustParse[*AcceptArguments]("/blob/accept")

commands/blob/list.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ package blob
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const ListCommand = "/blob/list"
8-
9-
var List = commands.MustParse[*ListArguments](ListCommand)
7+
var List = commands.MustParse[*ListArguments]("/blob/list")

commands/blob/remove.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ package blob
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const RemoveCommand = "/blob/remove"
8-
97
type RemoveOK = commands.Unit
108

11-
var Remove = commands.MustParse[*RemoveArguments](RemoveCommand)
9+
var Remove = commands.MustParse[*RemoveArguments]("/blob/remove")

commands/blob/retrieve.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ package blob
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const RetrieveCommand = "/blob/retrieve"
8-
97
// Retrieve is the service-level retrieval capability (e.g. used by the
108
// indexer to fetch content claims from a Piri node). It is NOT space-scoped:
119
// any holder of a valid delegation for `/blob/retrieve` may fetch the blob
@@ -14,4 +12,4 @@ const RetrieveCommand = "/blob/retrieve"
1412
// For user-facing retrieval that requires an allocation in a specific space
1513
// see `libforge/commands/content.Retrieve` (the `/content/retrieve`
1614
// capability).
17-
var Retrieve = commands.MustParse[*RetrieveArguments](RetrieveCommand)
15+
var Retrieve = commands.MustParse[*RetrieveArguments]("/blob/retrieve")

commands/claim/cache.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ package claim
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const CacheCommand = "/claim/cache"
8-
97
type CacheOK = commands.Unit
108

11-
var Cache = commands.MustParse[*CacheArguments](CacheCommand)
9+
var Cache = commands.MustParse[*CacheArguments]("/claim/cache")

commands/content/retrieve.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ package content
44

55
import "github.com/fil-forge/libforge/commands"
66

7-
const RetrieveCommand = "/content/retrieve"
8-
97
type RetrieveOK = commands.Unit
108

11-
var Retrieve = commands.MustParse[*RetrieveArguments](RetrieveCommand)
9+
var Retrieve = commands.MustParse[*RetrieveArguments]("/content/retrieve")

0 commit comments

Comments
 (0)