domain

package
v0.0.0-...-256d8ad Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 2 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   string `json:"id"`
	Name string `json:"name"`
}

type ChannelRepository

type ChannelRepository interface {
	Get(ctx context.Context) ([]Channel, error)
}

type ChannelUsecase

type ChannelUsecase interface {
	Get(ctx context.Context) ([]Channel, error)
}

type Chat

type Chat struct {
	ChannelID string `json:"channel_id"`
	Sender    string `json:"sender"`
	Message   string `json:"message"`
	CreatedAt int64  `json:"created_at"`
}

type ChatRepository

type ChatRepository interface {
	Get(ctx context.Context, channelID string, createdAt int64, limit int) ([]Chat, error)
	Create(ctx context.Context, chat Chat) error
	Publish(ctx context.Context, chat Chat) error
}

type ChatUsecase

type ChatUsecase interface {
	NewClient(ctx context.Context, r http.ResponseWriter, groupID string)
	CloseClient(ctx context.Context, r http.ResponseWriter, groupID string)
	Post(ctx context.Context, chat Chat) error
	Get(ctx context.Context, channelID string, createdAt int64, limit int) ([]Chat, error)
	Broadcast(ctx context.Context, chat Chat)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳