content

package module
v0.0.0-...-be4ae82 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

README

Content Discovery Service

Install the app:
make install
Diagrams:

Basic App

Static Prices

Dynamic Prices

CLI commands:
docker exec -it <container_name> \
  appcli addcontent --id="avatar.png" --title="My Avatar" --author="moti" --filepath="under/the/s3/path/image.png" --recipient_lud16="moti@getalby.com" --price=30
docker exec -it <container_name> \
  appcli updatecontent --id="avatar.png" --title="My Avatar" --author="moti" --filepath="under/the/s3/path/image.png" --recipient_lud16="moti@getalby.com" --price=30
docker exec -it <container_name> \
  appcli removecontent --id="avatar.png"
docker exec -it <container_name> \
  appcli getcontent --id="avatar.png"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	DB *db.DB

	*pb.UnimplementedContentServiceServer
	*pricespb.UnimplementedPricesServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context) (*Server, error)

func (*Server) AddContent

func (s *Server) AddContent(ctx context.Context, req *pb.AddContentRequest) (*pb.AddContentResponse, error)

func (*Server) GetContent

func (s *Server) GetContent(ctx context.Context, req *pb.GetContentRequest) (*pb.GetContentResponse, error)

func (*Server) RemoveContent

func (s *Server) RemoveContent(ctx context.Context, req *pb.RemoveContentRequest) (*pb.RemoveContentResponse, error)

func (*Server) SetupAWSConfig

func (s *Server) SetupAWSConfig(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

func (*Server) UpdateContent

func (s *Server) UpdateContent(ctx context.Context, req *pb.UpdateContentRequest) (*pb.UpdateContentResponse, error)

type ServerConfig

type ServerConfig struct {
	Region   string `env:"AWS_REGION" envDefault:"ap-northeast-1"`
	S3Bucket string `env:"AWS_S3_BUCKET"`
}

Directories

Path Synopsis
cmd
app

Jump to

Keyboard shortcuts

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