offer

package
v0.0.0-...-21ef3ff Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package offer provides an example model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Delete deletes m.
	Delete(m Offer) (Offer, error)
	// New creates m.
	New(m Offer) (Offer, error)
	// Set updates m.
	Set(m Offer) (Offer, error)
}

Interface is the Offer interface.

type Offer

type Offer struct {
	// Interface is used by methods.
	Interface Interface
	// Created is the created time.
	Created time.Time
	// Deleted is the deleted time.
	Deleted time.Time
	// ID is the ID.
	ID string
	// Name is the name.
	Name string
	// Updated is the updated time.
	Updated time.Time
}

Offer is an example model.

func (Offer) BetterName

func (m Offer) BetterName() string

BetterName is an example of a non-service method.

func (Offer) Delete

func (m Offer) Delete() (Offer, error)

Delete deletes m.

func (Offer) New

func (m Offer) New() (Offer, error)

New creates m.

func (Offer) Set

func (m Offer) Set() (Offer, error)

Set updates m.

func (Offer) Validate

func (m Offer) Validate() error

Validate validates m.

type Repository

type Repository interface {
	Load(id string) (Offer, bool)
	LoadAll() []Offer
	LoadRange(id string, limit int) ([]Offer, bool)
	Store(m Offer)
}

func NewRepository

func NewRepository(c gossie.ConnectionPool) Repository

Jump to

Keyboard shortcuts

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