package
0.0.0-20241221205048-61663e75b973
Repository: https://github.com/mujeebcodes/greenlight.git
Documentation: pkg.go.dev

# Functions

For ease of use, we also add a New() method which returns a Models struct containing the initialized MovieModel.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Check that the plaintext token has been provided and is exactly 26 bytes long.
No description provided by the author

# Constants

Define constants for the token scope.
Define constants for the token scope.

# Variables

No description provided by the author
Define a custom ErrDuplicateEmail error.
Define a custom ErrRecordNotFound error.
Define an error that our UnmarshalJSON() method can return if we're unable to parse or convert the JSON string successfully.
Define a custom ErrRecordNotFound error.

# Structs

No description provided by the author
Define a new Metadata struct for holding the pagination metadata.
Create a Models struct which wraps the MovieModel.
No description provided by the author
No description provided by the author
Define the PermissionModel type.
Define a Token struct to hold the data for an individual token.
Define the TokenModel type.
No description provided by the author
Create a UserModel struct which wraps the connection pool.

# Type aliases

Define a Permissions slice, which we will use to hold the permission codes (like "movies:read" and "movies:write") for a single user.
No description provided by the author