endpoints

package
v0.0.0-...-100be9c Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCreateAnnotationEndpoint

func MakeCreateAnnotationEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateCommentEndpoint

func MakeCreateCommentEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateLawEndpoint

func MakeCreateLawEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateLawsEndpoint

func MakeCreateLawsEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateUpstreamEndpoint

func MakeCreateUpstreamEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateUserEndpoint

func MakeCreateUserEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateUsersEndpoint

func MakeCreateUsersEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateVoteEndpoint

func MakeCreateVoteEndpoint(svc services.Service) endpoint.Endpoint

func MakeCreateVotesEndpoint

func MakeCreateVotesEndpoint(svc services.Service) endpoint.Endpoint

func MakeDeleteAnnotationEndpoint

func MakeDeleteAnnotationEndpoint(svc services.Service) endpoint.Endpoint

func MakeDeleteCommentEndpoint

func MakeDeleteCommentEndpoint(svc services.Service) endpoint.Endpoint

func MakeDeleteLawEndpoint

func MakeDeleteLawEndpoint(svc services.Service) endpoint.Endpoint

func MakeDeleteUserEndpoint

func MakeDeleteUserEndpoint(svc services.Service) endpoint.Endpoint

func MakeDeleteVoteEndpoint

func MakeDeleteVoteEndpoint(svc services.Service) endpoint.Endpoint

func MakeDiffLawsEndpoint

func MakeDiffLawsEndpoint(svc services.Service) endpoint.Endpoint

func MakeGetCommentEndpoint

func MakeGetCommentEndpoint(svc services.Service) endpoint.Endpoint

func MakeGetLawEndpoint

func MakeGetLawEndpoint(svc services.Service) endpoint.Endpoint

func MakeGetServerStatsEndpoint

func MakeGetServerStatsEndpoint(svc services.Service) endpoint.Endpoint

func MakeGetUpstreamEndpoint

func MakeGetUpstreamEndpoint(svc services.Service) endpoint.Endpoint

func MakeGetUserEndpoint

func MakeGetUserEndpoint(svc services.Service) endpoint.Endpoint

func MakeGetVoteEndpoint

func MakeGetVoteEndpoint(svc services.Service) endpoint.Endpoint

func MakeLikeCommentEndpoint

func MakeLikeCommentEndpoint(svc services.Service) endpoint.Endpoint

func MakeListAnnotationsEndpoint

func MakeListAnnotationsEndpoint(svc services.Service) endpoint.Endpoint

func MakeListCommentsEndpoint

func MakeListCommentsEndpoint(svc services.Service) endpoint.Endpoint

func MakeListLawsEndpoint

func MakeListLawsEndpoint(svc services.Service) endpoint.Endpoint

func MakeListUpstreamsEndpoint

func MakeListUpstreamsEndpoint(svc services.Service) endpoint.Endpoint

func MakeListUsersEndpoint

func MakeListUsersEndpoint(svc services.Service) endpoint.Endpoint

func MakeListVotesEndpoint

func MakeListVotesEndpoint(svc services.Service) endpoint.Endpoint

func MakeLoadReposEndpoint

func MakeLoadReposEndpoint(svc services.Service) endpoint.Endpoint

func MakeLoggedInCheckEndpoint

func MakeLoggedInCheckEndpoint(svc services.Service) endpoint.Endpoint

func MakeLoginAsEndpoint

func MakeLoginAsEndpoint(svc services.Service) endpoint.Endpoint

func MakeLoginCallbackEndpoint

func MakeLoginCallbackEndpoint(svc services.Service) endpoint.Endpoint

func MakeLoginEndpoint

func MakeLoginEndpoint(svc services.Service) endpoint.Endpoint

func MakeLogoutEndpoint

func MakeLogoutEndpoint(svc services.Service) endpoint.Endpoint

func MakeSaveReposEndpoint

func MakeSaveReposEndpoint(svc services.Service) endpoint.Endpoint

func MakeUpdateCommentEndpoint

func MakeUpdateCommentEndpoint(svc services.Service) endpoint.Endpoint

func MakeUpdateLawEndpoint

func MakeUpdateLawEndpoint(svc services.Service) endpoint.Endpoint

func MakeUpdateUpstreamEndpoint

func MakeUpdateUpstreamEndpoint(svc services.Service) endpoint.Endpoint

func MakeUpdateUserEndpoint

func MakeUpdateUserEndpoint(svc services.Service) endpoint.Endpoint

func MakeUpdateVoteEndpoint

func MakeUpdateVoteEndpoint(svc services.Service) endpoint.Endpoint

func MakeUploadAvatarEndpoint

func MakeUploadAvatarEndpoint(svc services.Service) endpoint.Endpoint

Types

type CreateAnnotationResponse

type CreateAnnotationResponse struct {
	Id  string `json:"id"`
	Err error  `json:"-"`
}

func (CreateAnnotationResponse) Failed

func (r CreateAnnotationResponse) Failed() error

type CreateCommentRequest

type CreateCommentRequest struct {
	Comment *proto.Comment `json:"comment"`
}

type CreateCommentResponse

type CreateCommentResponse struct {
	Comment *proto.Comment `json:"comment"`
	Err     error          `json:"-"`
}

func (CreateCommentResponse) Failed

func (r CreateCommentResponse) Failed() error

type CreateLawRequest

type CreateLawRequest struct {
	LawSet *proto.LawSet           `json:"law_set"`
	Opts   *proto.CreateLawOptions `json:"opts"`
}

type CreateLawResponse

type CreateLawResponse struct {
	LawSet *proto.LawSet `json:"law_set"`
	Err    error         `json:"-"`
}

func (CreateLawResponse) Failed

func (r CreateLawResponse) Failed() error

type CreateLawsRequest

type CreateLawsRequest struct {
	Laws []*proto.LawSet          `json:"laws"`
	Opts *proto.CreateLawsOptions `json:"opts"`
}

type CreateLawsResponse

type CreateLawsResponse struct {
	Laws []*proto.LawSet `json:"laws"`
	Err  error           `json:"-"`
}

func (CreateLawsResponse) Failed

func (r CreateLawsResponse) Failed() error

type CreateUpstreamRequest

type CreateUpstreamRequest struct {
	Upstream *proto.Upstream `json:"upstream"`
}

type CreateUpstreamResponse

type CreateUpstreamResponse struct {
	Err error `json:"-"`
}

func (CreateUpstreamResponse) Failed

func (r CreateUpstreamResponse) Failed() error

type CreateUserRequest

type CreateUserRequest struct {
	User *proto.User `json:"user"`
}

type CreateUserResponse

type CreateUserResponse struct {
	User *proto.User `json:"user"`
	Err  error       `json:"-"`
}

func (CreateUserResponse) Failed

func (r CreateUserResponse) Failed() error

type CreateUsersRequest

type CreateUsersRequest struct {
	Users []*proto.User `json:"suser"`
}

type CreateUsersResponse

type CreateUsersResponse struct {
	Users []*proto.User `json:"users"`
	Err   error         `json:"-"`
}

func (CreateUsersResponse) Failed

func (r CreateUsersResponse) Failed() error

type CreateVoteRequest

type CreateVoteRequest struct {
	Vote *proto.Vote              `json:"vote"`
	Opts *proto.CreateVoteOptions `json:"opts"`
}

type CreateVoteResponse

type CreateVoteResponse struct {
	Vote *proto.Vote `json:"vote"`
	Err  error       `json:"-"`
}

func (CreateVoteResponse) Failed

func (r CreateVoteResponse) Failed() error

type CreateVotesRequest

type CreateVotesRequest struct {
	Votes []*proto.Vote             `json:"votes"`
	Opts  *proto.CreateVotesOptions `json:"opts"`
}

type CreateVotesResponse

type CreateVotesResponse struct {
	Votes []*proto.Vote `json:"votes"`
	Err   error         `json:"-"`
}

func (CreateVotesResponse) Failed

func (r CreateVotesResponse) Failed() error

type DeleteAnnotationRequest

type DeleteAnnotationRequest struct {
	Id string `json:"id"`
}

type DeleteAnnotationResponse

type DeleteAnnotationResponse struct {
	Err error `json:"-"`
}

func (DeleteAnnotationResponse) Failed

func (r DeleteAnnotationResponse) Failed() error

type DeleteCommentRequest

type DeleteCommentRequest struct {
	Uid string `json:"uid"`
}

type DeleteCommentResponse

type DeleteCommentResponse struct {
	Err error `json:"-"`
}

func (DeleteCommentResponse) Failed

func (r DeleteCommentResponse) Failed() error

type DeleteLawRequest

type DeleteLawRequest struct {
	Upstream string                  `json:"upstream"`
	Ident    string                  `json:"ident"`
	Opts     *proto.DeleteLawOptions `json:"opts"`
}

type DeleteLawResponse

type DeleteLawResponse struct {
	Err error `json"-"`
}

func (DeleteLawResponse) Failed

func (r DeleteLawResponse) Failed() error

type DeleteUserRequest

type DeleteUserRequest struct {
	Username string `json:"username"`
}

type DeleteUserResponse

type DeleteUserResponse struct {
	Err error `json:"-"`
}

func (DeleteUserResponse) Failed

func (r DeleteUserResponse) Failed() error

type DeleteVoteRequest

type DeleteVoteRequest struct {
	Upstream string                   `json:"upstream"`
	Ident    string                   `json:"ident"`
	Opts     *proto.DeleteVoteOptions `json:"opts"`
}

type DeleteVoteResponse

type DeleteVoteResponse struct {
	Err error `json:"-"`
}

func (DeleteVoteResponse) Failed

func (r DeleteVoteResponse) Failed() error

type DiffLawsRequest

type DiffLawsRequest struct {
	Upstream string                 `json:"upstream"`
	Ident    string                 `json:"ident"`
	Opts     *proto.DiffLawsOptions `json:"opts"`
}

type DiffLawsResponse

type DiffLawsResponse struct {
	Diff   string        `json:"diff"`
	Theirs *proto.LawSet `json:"theirs"`
	Err    error         `json:"-"`
}

func (DiffLawsResponse) Failed

func (r DiffLawsResponse) Failed() error

type Endpoints

type Endpoints struct {
	// Admin
	GetServerStatsEndpoint endpoint.Endpoint
	LoadReposEndpoint      endpoint.Endpoint
	SaveReposEndpoint      endpoint.Endpoint
	// Auth
	LoggedInCheckEndpoint endpoint.Endpoint
	LoginEndpoint         endpoint.Endpoint
	LoginCallbackEndpoint endpoint.Endpoint
	LoginAsEndpoint       endpoint.Endpoint
	LogoutEndpoint        endpoint.Endpoint
	// Ballot
	CreateVoteEndpoint  endpoint.Endpoint
	CreateVotesEndpoint endpoint.Endpoint
	UpdateVoteEndpoint  endpoint.Endpoint
	GetVoteEndpoint     endpoint.Endpoint
	DeleteVoteEndpoint  endpoint.Endpoint
	ListVotesEndpoint   endpoint.Endpoint
	// Law
	CreateAnnotationEndpoint endpoint.Endpoint
	DeleteAnnotationEndpoint endpoint.Endpoint
	ListAnnotationsEndpoint  endpoint.Endpoint
	CreateCommentEndpoint    endpoint.Endpoint
	DeleteCommentEndpoint    endpoint.Endpoint
	GetCommentEndpoint       endpoint.Endpoint
	ListCommentsEndpoint     endpoint.Endpoint
	UpdateCommentEndpoint    endpoint.Endpoint
	LikeCommentEndpoint      endpoint.Endpoint
	CreateLawEndpoint        endpoint.Endpoint
	CreateLawsEndpoint       endpoint.Endpoint
	DeleteLawEndpoint        endpoint.Endpoint
	GetLawEndpoint           endpoint.Endpoint
	DiffLawsEndpoint         endpoint.Endpoint
	ListLawsEndpoint         endpoint.Endpoint
	UpdateLawEndpoint        endpoint.Endpoint
	// Upstreams
	CreateUpstreamEndpoint endpoint.Endpoint
	GetUpstreamEndpoint    endpoint.Endpoint
	ListUpstreamsEndpoint  endpoint.Endpoint
	UpdateUpstreamEndpoint endpoint.Endpoint
	// Users
	CreateUserEndpoint   endpoint.Endpoint
	CreateUsersEndpoint  endpoint.Endpoint
	DeleteUserEndpoint   endpoint.Endpoint
	GetUserEndpoint      endpoint.Endpoint
	ListUsersEndpoint    endpoint.Endpoint
	UpdateUserEndpoint   endpoint.Endpoint
	UploadAvatarEndpoint endpoint.Endpoint
}

func (Endpoints) CreateAnnotation

func (e Endpoints) CreateAnnotation(ctx context.Context, ann *proto.Annotation) (string, error)

func (Endpoints) CreateComment

func (e Endpoints) CreateComment(ctx context.Context, comment *proto.Comment) (*proto.Comment, error)

func (Endpoints) CreateLaw

func (Endpoints) CreateLaws

func (e Endpoints) CreateLaws(ctx context.Context, sets []*proto.LawSet, opts *proto.CreateLawsOptions) ([]*proto.LawSet, error)

func (Endpoints) CreateUpstream

func (e Endpoints) CreateUpstream(ctx context.Context, u *proto.Upstream) error

func (Endpoints) CreateUser

func (e Endpoints) CreateUser(ctx context.Context, newUser *proto.User) (*proto.User, error)

func (Endpoints) CreateUsers

func (e Endpoints) CreateUsers(ctx context.Context, users []*proto.User) ([]*proto.User, error)

func (Endpoints) CreateVote

func (e Endpoints) CreateVote(ctx context.Context, vote *proto.Vote, opts *proto.CreateVoteOptions) (*proto.Vote, error)

func (Endpoints) CreateVotes

func (e Endpoints) CreateVotes(ctx context.Context, votes []*proto.Vote, opts *proto.CreateVotesOptions) ([]*proto.Vote, error)

func (Endpoints) DeleteAnnotation

func (e Endpoints) DeleteAnnotation(ctx context.Context, id string) error

func (Endpoints) DeleteComment

func (e Endpoints) DeleteComment(ctx context.Context, uid string) error

func (Endpoints) DeleteLaw

func (e Endpoints) DeleteLaw(ctx context.Context, upstream, ident string, opts *proto.DeleteLawOptions) error

func (Endpoints) DeleteUser

func (e Endpoints) DeleteUser(ctx context.Context, username string) error

func (Endpoints) DeleteVote

func (e Endpoints) DeleteVote(ctx context.Context, upstream, ident string, opts *proto.DeleteVoteOptions) error

func (Endpoints) DiffLaws

func (e Endpoints) DiffLaws(ctx context.Context, upstream, ident string, opts *proto.DiffLawsOptions) (*proto.DiffLawsReply, error)

func (Endpoints) GetComment

func (e Endpoints) GetComment(ctx context.Context, opts *proto.GetCommentOptions) (*proto.Comment, error)

func (Endpoints) GetLaw

func (e Endpoints) GetLaw(ctx context.Context, upstream, ident string, opts *proto.GetLawOptions) (*proto.GetLawReply, error)

func (Endpoints) GetServerStats

func (e Endpoints) GetServerStats(ctx context.Context) (*proto.ServerStats, error)

func (Endpoints) GetUpstream

func (e Endpoints) GetUpstream(ctx context.Context, ident string) (*proto.Upstream, error)

func (Endpoints) GetUser

func (e Endpoints) GetUser(ctx context.Context, opts *proto.GetUserOptions) (*proto.User, error)

func (Endpoints) GetVote

func (e Endpoints) GetVote(ctx context.Context, upstream, ident string, opts *proto.GetVoteOptions) (*proto.Vote, error)

func (Endpoints) LikeComment

func (e Endpoints) LikeComment(ctx context.Context, opts *proto.LikeCommentOptions) error

func (Endpoints) ListAnnotations

func (e Endpoints) ListAnnotations(ctx context.Context, opts *proto.ListAnnotationsOptions) ([]*proto.Annotation, int, error)

func (Endpoints) ListComments

func (e Endpoints) ListComments(ctx context.Context, opts *proto.ListCommentsOptions) ([]*proto.Comment, int, error)

func (Endpoints) ListLaws

func (Endpoints) ListUpstreams

func (e Endpoints) ListUpstreams(ctx context.Context) ([]*proto.Upstream, error)

func (Endpoints) ListUsers

func (e Endpoints) ListUsers(ctx context.Context, opts *proto.ListUsersOptions) ([]*proto.User, int, error)

func (Endpoints) ListVotes

func (Endpoints) LoadRepos

func (Endpoints) LoggedInCheck

func (e Endpoints) LoggedInCheck(ctx context.Context) (*proto.User, error)

func (Endpoints) Login

func (e Endpoints) Login(ctx context.Context, returnUrl, provider string) (*http.Cookie, string, error)

func (Endpoints) LoginAs

func (e Endpoints) LoginAs(ctx context.Context, user *proto.User) error

func (Endpoints) LoginCallback

func (e Endpoints) LoginCallback(ctx context.Context, state, code string) (*http.Cookie, *http.Cookie, string, error)

func (Endpoints) Logout

func (e Endpoints) Logout(ctx context.Context) error

func (Endpoints) SaveRepos

func (Endpoints) UpdateComment

func (e Endpoints) UpdateComment(ctx context.Context, comment *proto.Comment) (*proto.Comment, error)

func (Endpoints) UpdateLaw

func (e Endpoints) UpdateLaw(ctx context.Context, set *proto.LawSet, opts *proto.UpdateLawOptions) error

func (Endpoints) UpdateUpstream

func (e Endpoints) UpdateUpstream(ctx context.Context, upstream *proto.Upstream) error

func (Endpoints) UpdateUser

func (e Endpoints) UpdateUser(ctx context.Context, username string, opts *proto.UpdateUserOptions) (*proto.User, error)

func (Endpoints) UpdateVote

func (e Endpoints) UpdateVote(ctx context.Context, v *proto.Vote, opts *proto.UpdateVoteOptions) (*proto.Vote, error)

func (Endpoints) UploadAvatar

func (e Endpoints) UploadAvatar(ctx context.Context, opts *proto.UploadAvatarOptions) error

type Failer

type Failer interface {
	Failed() error
}

type GetCommentRequest

type GetCommentRequest struct {
	Opts *proto.GetCommentOptions `json:"opts"`
}

type GetCommentResponse

type GetCommentResponse struct {
	Comment *proto.Comment `json:"comment"`
	Err     error          `json:"-"`
}

func (GetCommentResponse) Failed

func (r GetCommentResponse) Failed() error

type GetLawRequest

type GetLawRequest struct {
	Upstream string               `json:"upstream"`
	Ident    string               `json:"ident"`
	Opts     *proto.GetLawOptions `json:"opts"`
}

type GetLawResponse

type GetLawResponse struct {
	LawSet *proto.LawSet `json:"law_set"`
	Err    error         `json:"-"`
}

func (GetLawResponse) Failed

func (r GetLawResponse) Failed() error

type GetServerStatsRequest

type GetServerStatsRequest struct{}

type GetServerStatsResponse

type GetServerStatsResponse struct {
	Stats *proto.ServerStats `json:"stats"`
	Err   error              `json:"-"`
}

func (GetServerStatsResponse) Failed

func (r GetServerStatsResponse) Failed() error

type GetUpstreamRequest

type GetUpstreamRequest struct {
	Ident string `json:"ident"`
}

type GetUpstreamResponse

type GetUpstreamResponse struct {
	Upstream *proto.Upstream `json:"upstream"`
	Laws     []*proto.LawSet `json:"laws"`
	Users    []*proto.User   `json:"user"`
	Err      error           `json:"-"`
}

func (GetUpstreamResponse) Failed

func (r GetUpstreamResponse) Failed() error

type GetUserRequest

type GetUserRequest struct {
	Opts *proto.GetUserOptions `json:"opts"`
}

type GetUserResponse

type GetUserResponse struct {
	//GetUserReply *proto.GetUserReply `json:"reply"`
	User *proto.User `json:"user"`
	Err  error       `json:"-"`
}

func (GetUserResponse) Failed

func (r GetUserResponse) Failed() error

type GetVoteRequest

type GetVoteRequest struct {
	Upstream string                `json:"upstream"`
	Ident    string                `json:"ident"`
	Opts     *proto.GetVoteOptions `json:"opts"`
}

type GetVoteResponse

type GetVoteResponse struct {
	Vote *proto.Vote `json:"vote"`
	Err  error       `json:"-"`
}

func (GetVoteResponse) Failed

func (r GetVoteResponse) Failed() error

type LikeCommentRequest

type LikeCommentRequest struct {
	Opts *proto.LikeCommentOptions `json:"opts"`
}

type LikeCommentResponse

type LikeCommentResponse struct {
	Err error `json:"-"`
}

func (LikeCommentResponse) Failed

func (r LikeCommentResponse) Failed() error

type ListAnnotationsRequest

type ListAnnotationsRequest struct {
	Opts *proto.ListAnnotationsOptions `json:"opts"`
}

type ListAnnotationsResponse

type ListAnnotationsResponse struct {
	Rows  []*proto.Annotation `json:"rows"`
	Total int                 `json:"total"`
	Err   error               `json:"-"`
}

func (ListAnnotationsResponse) Failed

func (r ListAnnotationsResponse) Failed() error

type ListCommentsRequest

type ListCommentsRequest struct {
	Opts *proto.ListCommentsOptions `json:"opts"`
}

type ListCommentsResponse

type ListCommentsResponse struct {
	Rows  []*proto.Comment `json:"rows"`
	Total int              `json:"total"`
	Err   error            `json:"-"`
}

func (ListCommentsResponse) Failed

func (r ListCommentsResponse) Failed() error

type ListLawsRequest

type ListLawsRequest struct {
	Opts *proto.ListLawsOptions `json:"opts"`
}

type ListLawsResponse

type ListLawsResponse struct {
	Laws  []*proto.LawSet `json:"laws"`
	Total int             `json:"total"`
	Err   error           `json:"-"`
}

func (ListLawsResponse) Failed

func (r ListLawsResponse) Failed() error

type ListUpstreamsRequest

type ListUpstreamsRequest struct{}

type ListUpstreamsResponse

type ListUpstreamsResponse struct {
	Upstreams []*proto.Upstream `json:"upstreams"`
	Err       error             `json:"-"`
}

func (ListUpstreamsResponse) Failed

func (r ListUpstreamsResponse) Failed() error

type ListUsersRequest

type ListUsersRequest struct {
	Opts *proto.ListUsersOptions `json:"opts"`
}

type ListUsersResponse

type ListUsersResponse struct {
	Users []*proto.User `json:"users"`
	Total int           `json:"total"`
	Err   error         `json:"-"`
}

func (ListUsersResponse) Failed

func (r ListUsersResponse) Failed() error

type ListVotesRequest

type ListVotesRequest struct {
	Opts *proto.ListVotesOptions `json:"opts"`
}

type ListVotesResponse

type ListVotesResponse struct {
	Votes []*proto.Vote `json:"votes"`
	Total int32         `json:"total"`
	Err   error         `json:"-"`
}

func (ListVotesResponse) Failed

func (r ListVotesResponse) Failed() error

type LoadReposRequest

type LoadReposRequest struct {
	Opts *proto.LoadReposOptions `json:"opts"`
}

type LoadReposResponse

type LoadReposResponse struct {
	Reply *proto.LoadReposReply `json:"reply"`
	Err   error                 `json:"-"`
}

func (LoadReposResponse) Failed

func (r LoadReposResponse) Failed() error

type LoggedInCheckRequest

type LoggedInCheckRequest struct{}

type LoggedInCheckResponse

type LoggedInCheckResponse struct {
	User *proto.User `json:"user"`
	Err  error       `json:"-"`
}

func (LoggedInCheckResponse) Failed

func (r LoggedInCheckResponse) Failed() error

type LoginAsRequest

type LoginAsRequest struct {
	User *proto.User `json:"user"`
}

type LoginAsResponse

type LoginAsResponse struct {
	Err error `json:"-"`
}

func (LoginAsResponse) Failed

func (r LoginAsResponse) Failed() error

type LoginCallbackRequest

type LoginCallbackRequest struct {
	State string `json:"state"`
	Code  string `json:"code"`
}

type LoginCallbackResponse

type LoginCallbackResponse struct {
	LoginCookie *http.Cookie `json:"-"`
	Cookie      *http.Cookie `json:"-"`
	Url         string       `json:"url"`
	Err         error        `json:"-"`
}

func (LoginCallbackResponse) Failed

func (r LoginCallbackResponse) Failed() error

type LoginRequest

type LoginRequest struct {
	ReturnUrl string `json:"return_url"`
	Provider  string `json:"provider"`
}

type LoginResponse

type LoginResponse struct {
	Cookie *http.Cookie `json:"-"`
	Url    string       `json:"url"`
	Err    error        `json:"-"`
}

func (LoginResponse) Failed

func (r LoginResponse) Failed() error

type LogoutRequest

type LogoutRequest struct {
}

type LogoutResponse

type LogoutResponse struct {
	Err error `json:"-"`
}

func (LogoutResponse) Failed

func (r LogoutResponse) Failed() error

type SaveReposRequest

type SaveReposRequest struct {
	Opts *proto.SaveReposOptions `json:"opts"`
}

type SaveReposResponse

type SaveReposResponse struct {
	Reply *proto.SaveReposReply `json:"reply"`
	Err   error                 `json:"-"`
}

func (SaveReposResponse) Failed

func (r SaveReposResponse) Failed() error

type UpdateCommentRequest

type UpdateCommentRequest struct {
	Comment *proto.Comment `json:"comment"`
}

type UpdateCommentResponse

type UpdateCommentResponse struct {
	Comment *proto.Comment `json:"comment"`
	Err     error          `json:"-"`
}

func (UpdateCommentResponse) Failed

func (r UpdateCommentResponse) Failed() error

type UpdateLawRequest

type UpdateLawRequest struct {
	Law  *proto.LawSet           `json:"law"`
	Opts *proto.UpdateLawOptions `json:"opts"`
}

type UpdateLawResponse

type UpdateLawResponse struct {
	Err error `json:"-"`
}

func (UpdateLawResponse) Failed

func (r UpdateLawResponse) Failed() error

type UpdateUpstreamRequest

type UpdateUpstreamRequest struct {
	Upstream *proto.Upstream `json:"upstream"`
}

type UpdateUpstreamResponse

type UpdateUpstreamResponse struct {
	Err error `json:"-"`
}

func (UpdateUpstreamResponse) Failed

func (r UpdateUpstreamResponse) Failed() error

type UpdateUserRequest

type UpdateUserRequest struct {
	//User *proto.User              `json:"user"`
	Username string                   `json:"username"`
	Opts     *proto.UpdateUserOptions `json:"opts"`
}

type UpdateUserResponse

type UpdateUserResponse struct {
	User *proto.User `json:"user"`
	Err  error       `json:"-"`
}

func (UpdateUserResponse) Failed

func (r UpdateUserResponse) Failed() error

type UpdateVoteRequest

type UpdateVoteRequest struct {
	Vote *proto.Vote              `json:"vote"`
	Opts *proto.UpdateVoteOptions `json:"opts"`
}

type UpdateVoteResponse

type UpdateVoteResponse struct {
	Vote *proto.Vote `json:"vote"`
	Err  error       `json"-"`
}

func (UpdateVoteResponse) Failed

func (r UpdateVoteResponse) Failed() error

type UploadAvatarRequest

type UploadAvatarRequest struct {
	Opts *proto.UploadAvatarOptions `json:"opts"`
}

type UploadAvatarResponse

type UploadAvatarResponse struct {
	Err error `json:"-"`
}

func (UploadAvatarResponse) Failed

func (r UploadAvatarResponse) Failed() error

Jump to

Keyboard shortcuts

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