container

package
v0.0.0-...-cec8117 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

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

func NewInMemory

func NewInMemory() InMemory

func (*InMemory) Delete

func (c *InMemory) Delete(id string) error

Delete implements 09-blog.Container.

func (*InMemory) GetAll

func (c *InMemory) GetAll() ([]blog.Post, error)

GetAll implements blog.Container.

func (*InMemory) Insert

func (c *InMemory) Insert(post *blog.Post) error

Insert implements 09-blog.Container.

type MongoOptions

type MongoOptions struct {
	URI string
}

type MongoStore

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

func NewMongoStore

func NewMongoStore(opts MongoOptions) MongoStore

func (*MongoStore) Delete

func (c *MongoStore) Delete(id string) error

Delete implements 09-blog.Container.

func (*MongoStore) GetAll

func (c *MongoStore) GetAll() ([]blog.Post, error)

GetAll implements 09-blog.Container.

func (*MongoStore) Init

func (c *MongoStore) Init() error

func (*MongoStore) Insert

func (c *MongoStore) Insert(post *blog.Post) error

Insert implements 09-blog.Container.

type MySQLOptions

type MySQLOptions struct {
	URI string
}

type MySQLStore

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

func NewMySQLStore

func NewMySQLStore(opts MySQLOptions) MySQLStore

func (*MySQLStore) Delete

func (c *MySQLStore) Delete(id string) error

Delete implements 09-blog.Container.

func (*MySQLStore) GetAll

func (c *MySQLStore) GetAll() ([]blog.Post, error)

GetAll implements 09-blog.Container.

func (*MySQLStore) Init

func (c *MySQLStore) Init() error

func (*MySQLStore) Insert

func (c *MySQLStore) Insert(post *blog.Post) error

Insert implements 09-blog.Container.

Jump to

Keyboard shortcuts

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