2024-12-05 20:36:58 -05:00
|
|
|
package producer
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
|
"github.com/onsonr/sonr/crypto/ucan"
|
2024-12-13 15:10:27 -05:00
|
|
|
"github.com/onsonr/sonr/pkg/ipfsapi"
|
2024-12-05 20:36:58 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type ProducerContext struct {
|
|
|
|
|
echo.Context
|
|
|
|
|
// TokenParser is the attentuations assigned to the producer service
|
|
|
|
|
TokenParser *ucan.TokenParser
|
|
|
|
|
|
|
|
|
|
// TokenStore is the token store used to store and retrieve tokens
|
2024-12-13 15:10:27 -05:00
|
|
|
TokenStore ipfsapi.IPFSTokenStore
|
2024-12-05 20:36:58 -05:00
|
|
|
|
|
|
|
|
// IPFSClient is the IPFS client used to resolve the UCAN
|
2024-12-13 15:10:27 -05:00
|
|
|
IPFSClient ipfsapi.Client
|
2024-12-05 20:36:58 -05:00
|
|
|
}
|