iwad

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright © 2022 Sylvia Waldron

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathInvalid = errors.New("iwad path is invalid")
	ErrEmptyName   = errors.New("iwad name cannot be empty")
)

Functions

This section is empty.

Types

type IWad

type IWad struct {
	Name string
	Path string
}

func Doom1Wad

func Doom1Wad() *IWad

func New

func New(name, path string) (*IWad, error)

func (IWad) String added in v0.2.1

func (iw IWad) String() string

type Repository

type Repository interface {
	Create(iwad *IWad) error
	GetAll() ([]IWad, error)
	GetByName(name string) (*IWad, error)
	Update(updated *IWad) error
	Delete(name string) error
}

type SqliteRepository

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

func NewSqliteRepository

func NewSqliteRepository(db *db.DB) (*SqliteRepository, error)

func (*SqliteRepository) Create

func (r *SqliteRepository) Create(iwad *IWad) error

func (*SqliteRepository) Delete

func (r *SqliteRepository) Delete(name string) error

func (*SqliteRepository) GetAll

func (r *SqliteRepository) GetAll() ([]IWad, error)

func (*SqliteRepository) GetByName

func (r *SqliteRepository) GetByName(name string) (*IWad, error)

func (*SqliteRepository) Update

func (r *SqliteRepository) Update(updated *IWad) error

Jump to

Keyboard shortcuts

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