service

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Service

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

func NewS3Service

func NewS3Service(region, endpoint, secretId, secretKey, bucket string) (*S3Service, error)

func (*S3Service) DeleteFile

func (s *S3Service) DeleteFile(filePath string) error

func (*S3Service) GetFile

func (s *S3Service) GetFile(filePath string) (io.Reader, error)

GetFile 获取文件

func (*S3Service) SaveFile

func (s *S3Service) SaveFile(filePath string, file []byte) error

SaveFile 保存文件至S3

type VideoService

type VideoService struct {
	feed.UnimplementedFeedServiceServer
	// contains filtered or unexported fields
}

func NewVideoService

func NewVideoService(
	s3Conf conf.S3,
	neo4jConf conf.Neo4j,
	secret conf.Secret,
	userService user.UserServiceClient,
	node int64) (*VideoService, error)

func (*VideoService) CreateVideo

func (v *VideoService) CreateVideo(file io.Reader, autherId uint32, title string) (*model.VideoInfo, error)

func (*VideoService) GetVideo

func (v *VideoService) GetVideo(videoId int64) (*model.VideoInfo, error)

func (*VideoService) ListVideosByAuthor

func (*VideoService) ListWatchVideos

Jump to

Keyboard shortcuts

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