crew

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store encapsulates our dependency

func NewStore

func NewStore(db *sqlx.DB) *Store

NewStore creates our data store

func (*Store) Delete

func (m *Store) Delete(ctx context.Context, crewID int) error

Delete will completely remove the crew position

func (*Store) DeleteUser

func (m *Store) DeleteUser(ctx context.Context, crewID int) error

DeleteUser clears the user ID from the crew ID object

func (*Store) Get

func (m *Store) Get(ctx context.Context, crewID int) (*clapper.CrewPosition, error)

Get returns a crew position object

func (*Store) New

func (m *Store) New(ctx context.Context, signupID, positionID int) error

New creates a new crew position, with default settings

func (*Store) UpdateUser

func (m *Store) UpdateUser(ctx context.Context, crewID, userID int) error

UpdateUser Updates the user field for the specified crew ID to the specified user ID

func (*Store) UpdateUserAndVerify

func (m *Store) UpdateUserAndVerify(ctx context.Context, crewID, userID int) error

UpdateUserAndVerify will update a crew object to the specified user ID, it will also perform additional checks to ensure they have enough permission

Jump to

Keyboard shortcuts

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