item

package
v0.0.0-...-4ec28c1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID          uuid.UUID
	ShortUrl    string
	LongUrl     string
	Count       int
	Permissions int
}

type ItemStore

type ItemStore interface {
	Create(ctx context.Context, u Item) (*uuid.UUID, error)
	Read(ctx context.Context, uid uuid.UUID) (*Item, error)
	Delete(ctx context.Context, uid uuid.UUID) error
	SearchItems(ctx context.Context, s string) (chan Item, error)
}

type Items

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

func NewUsers

func NewUsers(ustore ItemStore) *Items

func (*Items) Create

func (us *Items) Create(ctx context.Context, u Item) (*Item, error)

func (*Items) Delete

func (us *Items) Delete(ctx context.Context, uid uuid.UUID) (*Item, error)

func (*Items) Read

func (us *Items) Read(ctx context.Context, uid uuid.UUID) (*Item, error)

func (*Items) SearchItems

func (us *Items) SearchItems(ctx context.Context, s string) (chan Item, error)

Jump to

Keyboard shortcuts

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