endpoints

package
v0.0.0-...-5aa591a Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: AGPL-3.0, AGPL-3.0-or-later Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

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

Endpoints represents all endpoints of the http server

func NewEndpoints

func NewEndpoints(
	db *gorm.DB,
	redisClient *redis.Client,
) *Endpoints

NewEndpoints is just below the http handlers

func (*Endpoints) ChangePassword

func (e *Endpoints) ChangePassword(user *domain.User, oldPassword, newPassword string) error

func (Endpoints) Charge

func (e Endpoints) Charge(accessToken, paymentToken string, amount uint64) error

func (Endpoints) CreateComment

func (e Endpoints) CreateComment(iss *domain.Comment) error

func (Endpoints) CreateIssue

func (e Endpoints) CreateIssue(iss *domain.Issue) error

func (Endpoints) CreatePost

func (e Endpoints) CreatePost(iss *domain.Post) error

func (Endpoints) CreateProject

func (e Endpoints) CreateProject(proj *domain.Project) error

func (Endpoints) CreateToken

func (e Endpoints) CreateToken(iss *domain.Token) error

func (Endpoints) DeleteStar

func (e Endpoints) DeleteStar(userId, projectId string) error

func (*Endpoints) GetUser

func (e *Endpoints) GetUser(tokenId string) (*domain.User, error)

GetUser by token

func (*Endpoints) HasNick

func (e *Endpoints) HasNick(tokenId, author string) error

func (*Endpoints) Login

func (e *Endpoints) Login(email, password string) (*domain.User, *domain.AccessToken, error)

func (*Endpoints) OwnsProject

func (e *Endpoints) OwnsProject(tokenId, projectId string) error

func (Endpoints) PutStar

func (e Endpoints) PutStar(userId, projectId string) error

func (*Endpoints) Register

func (e *Endpoints) Register(email, name, password string) (*domain.User, *domain.AccessToken, error)

func (*Endpoints) ResetPassword

func (e *Endpoints) ResetPassword(secret, newPassword string) (*domain.AccessToken, error)

func (*Endpoints) SendResetEmail

func (e *Endpoints) SendResetEmail(email string) error

func (Endpoints) UpdateComment

func (e Endpoints) UpdateComment(iss *domain.Comment) error

func (Endpoints) UpdateIssue

func (e Endpoints) UpdateIssue(iss *domain.Issue) error

func (Endpoints) UpdatePost

func (e Endpoints) UpdatePost(iss *domain.Post) error

func (Endpoints) UpdateProject

func (e Endpoints) UpdateProject(proj *domain.Project) error

Jump to

Keyboard shortcuts

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