ipfs

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(nc *nats.Conn, service *Service, n int) *Consumer

func (*Consumer) Start

func (c *Consumer) Start(ctx context.Context) error

type Data

type Data struct {
	IpfsID    string `gorm:"primary_key"`
	CreatedAt time.Time
	Type      string
	Data      datatypes.JSON
}

func (Data) TableName

func (d Data) TableName() string

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(db *gorm.DB) *Repo

func (*Repo) Create

func (r *Repo) Create(data Data) error

func (*Repo) GetByID

func (r *Repo) GetByID(id string) (*Data, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(repo *Repo, fetcher fetcher, publisher publisher) *Service

func (*Service) GetByID

func (s *Service) GetByID(_ context.Context, id string) (*Data, error)

func (*Service) Process

func (s *Service) Process(_ context.Context, ipfsID, ipfsType string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL