extracts CodexManifest to a separate file

This commit is contained in:
Marcin Czenko 2025-10-24 20:56:19 +02:00
parent 37bd27abf1
commit 19807f7890
No known key found for this signature in database
GPG Key ID: A0449219BDBA98AE
2 changed files with 14 additions and 12 deletions

View File

@ -23,18 +23,6 @@ type CodexClient struct {
Client *http.Client
}
type CodexManifest struct {
CID string `json:"cid"`
Manifest struct {
TreeCid string `json:"treeCid"`
DatasetSize int64 `json:"datasetSize"`
BlockSize int `json:"blockSize"`
Protected bool `json:"protected"`
Filename string `json:"filename"`
Mimetype string `json:"mimetype"`
} `json:"manifest"`
}
// NewCodexClient creates a new Codex client
func NewCodexClient(host string, port string) *CodexClient {
return &CodexClient{

View File

@ -0,0 +1,14 @@
package communities
// CodexManifest represents the manifest structure returned by Codex API
type CodexManifest struct {
CID string `json:"cid"`
Manifest struct {
TreeCid string `json:"treeCid"`
DatasetSize int64 `json:"datasetSize"`
BlockSize int `json:"blockSize"`
Protected bool `json:"protected"`
Filename string `json:"filename"`
Mimetype string `json:"mimetype"`
} `json:"manifest"`
}