Help us shape the future of Go! Take the 2026 Go Developer Survey

movie

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: MIT Imports: 7 Imported by: 1

README

movie

Create, Update, Delete and Get Movie Details - demo module for Go-API-template

Documentation

Overview

Package movie has the Movie struct and associated methods to create, modify, delete and get movies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Movie

type Movie struct {
	Title    string
	Year     int
	Rated    string
	Released time.Time
	RunTime  int
	Director string
	Writer   string
	dbaudit.Audit
}

Movie holds details of a movie

func (*Movie) Create

func (m *Movie) Create(ctx context.Context, log zerolog.Logger, tx *sql.Tx) (*sql.Tx, error)

Create creates a Movie and stores it in the database

func (*Movie) Validate

func (m *Movie) Validate() error

Validate does basic input validation and ensures the struct is properly constructed

Jump to

Keyboard shortcuts

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