channel

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	DisplayName string    `json:"display_name"`
	ImagePath   string    `json:"image_path"`
	UpdatedAt   time.Time `json:"updated_at"`
	CreatedAt   time.Time `json:"created_at"`
}

type Service

type Service struct {
	Store *database.Database
}

func NewService

func NewService(store *database.Database) *Service

func (*Service) CheckChannelExists

func (s *Service) CheckChannelExists(cName string) bool

func (*Service) CheckChannelExistsNoContext

func (s *Service) CheckChannelExistsNoContext(cName string) bool

func (*Service) CreateChannel

func (s *Service) CreateChannel(channelDto Channel) (*ent.Channel, error)

func (*Service) DeleteChannel

func (s *Service) DeleteChannel(channelID uuid.UUID) error

func (*Service) GetChannel

func (s *Service) GetChannel(channelID uuid.UUID) (*ent.Channel, error)

func (*Service) GetChannelByName

func (s *Service) GetChannelByName(cName string) (*ent.Channel, error)

func (*Service) GetChannels

func (s *Service) GetChannels() ([]*ent.Channel, error)

func (*Service) UpdateChannel

func (s *Service) UpdateChannel(cId uuid.UUID, channelDto Channel) (*ent.Channel, error)

Jump to

Keyboard shortcuts

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