tuc

package module
v0.6.1-0...-0fdad61 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: MIT Imports: 0 Imported by: 0

README

TUC API — Check the balance of TUC cards

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Balance float64 `json:"balance"`
	ID      string  `json:"id"`
	Name    string  `json:"name"`
	Number  string  `json:"number"`
	UserID  string  `json:"-" dynamodbav:"u_id"`
}

Card is an individual's card for an user.

type CardService

type CardService interface {
	List(userID string) ([]Card, error)
	Get(userID, cardID string) (*Card, error)
	Create(card *Card) error
	Update(userID, cardID string, balance float64) (*Card, error)
	Delete(userID, cardID string) error
}

CardService represents a service for managing cards.

type LoginRequest

type LoginRequest struct {
	RequestToken      string `json:"request_token"`
	UserID            string `json:"-" dynamodbav:"u_id"`
	VerificationToken string `json:"verification_token"`
	Verified          bool   `json:"verified"`
}

LoginRequest is a login request for a user.

type LoginRequestService

type LoginRequestService interface {
	Create(request *LoginRequest) error
	Delete(email, code string) error

	Verify(email, token string) error
}

LoginRequestService represents a service for managing login requests.

type User

type User struct {
	FacebookID string `json:"-" dynamodbav:"facebook_id,omitempty"`
	GoogleID   string `json:"-" dynamodbav:"google_id,omitempty"`
	ID         string `json:"id"`
}

User is an individual's account on Saldo TUC.

type UserService

type UserService interface {
	Find(email string) (*User, error)
	Create(user *User) error
	Update(user *User) error
}

UserService represents a service for managing users.

Directories

Path Synopsis
cmd
tuc command
lambda

Jump to

Keyboard shortcuts

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