biz

package
v0.0.0-...-213d5aa Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UDPPacket

type UDPPacket struct {
	Name, Id, Title, Content string
	UpdateTime               *timestamppb.Timestamp
}

type UDPPacketRepo

type UDPPacketRepo interface {
	ListUDPPackets(ctx context.Context) (*UDPPackets, error)
	// name means the last part of url path like `/udp/uuid`, uuid is name
	GetUDPPacket(ctx context.Context, name string) (*UDPPacket, error)
	CreateUDPPacket(ctx context.Context, udp *UDPPacket) (*UDPPacket, error)
	UpdateUDPPacket(ctx context.Context, udp *UDPPacket) (*UDPPacket, error)
	// name means the last part of url path like `/udp/uuid`, uuid is name
	DeleteUDPPacket(ctx context.Context, name string) error
}

type UDPPacketUsecase

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

func NewUDPPacketUsecase

func NewUDPPacketUsecase(repo UDPPacketRepo) *UDPPacketUsecase

func (*UDPPacketUsecase) Create

func (uc *UDPPacketUsecase) Create(ctx context.Context, udp *UDPPacket) (*UDPPacket, error)

func (*UDPPacketUsecase) Delete

func (uc *UDPPacketUsecase) Delete(ctx context.Context, name string) error

func (*UDPPacketUsecase) Get

func (uc *UDPPacketUsecase) Get(ctx context.Context, name string) (*UDPPacket, error)

func (*UDPPacketUsecase) List

func (uc *UDPPacketUsecase) List(ctx context.Context) (*UDPPackets, error)

func (*UDPPacketUsecase) Update

func (uc *UDPPacketUsecase) Update(ctx context.Context, udp *UDPPacket) (*UDPPacket, error)

type UDPPackets

type UDPPackets struct {
	UdpPackets    []*UDPPacket
	NextPageToken string
}

Jump to

Keyboard shortcuts

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