review

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

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReviewTypeJit     = "jit"
	ReviewTypeOneTime = "onetime"
)

Variables

View Source
var (
	ErrNotFound     = errors.New("review not found")
	ErrWrongState   = errors.New("review in wrong state")
	ErrNotEligible  = errors.New("not eligible for review")
	ErrSelfApproval = errors.New("unable to self approve review")
)

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Service service
}

func (*Handler) FindAll

func (h *Handler) FindAll(c *gin.Context)

func (*Handler) Put

func (h *Handler) Put(c *gin.Context)

type Service

type Service struct {
	TransportService transportService
}

func (*Service) FindBySessionID

func (s *Service) FindBySessionID(ctx pgrest.Context, sessionID string) (*types.Review, error)

FindOneTimeReview returns an one time review by session id

func (*Service) FindOne

func (s *Service) FindOne(ctx pgrest.OrgContext, id string) (*types.Review, error)

func (*Service) Persist

func (s *Service) Persist(ctx pgrest.OrgContext, review *types.Review) error

func (*Service) Review

func (s *Service) Review(ctx *storagev2.Context, reviewID string, status types.ReviewStatus) (*types.Review, error)

called by slack plugin and webapp

func (*Service) Revoke

func (s *Service) Revoke(ctx pgrest.OrgContext, reviewID string) (*types.Review, error)

Jump to

Keyboard shortcuts

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