Versions in this module Expand all Collapse all v0 v0.1.0 Jun 11, 2024 Changes in this version + const SuccessMessage + var ErrOrganizationDoesNotExist = errors.New("the organization does not exist") + var ErrProjectDoesNotExist = errors.New("the project does not exist") + var ErrStackDoesNotExist = errors.New("the stack does not exist") + func FailureResponse(ctx context.Context, err error) render.Renderer + func GenerateResponse(ctx context.Context, data any, err error) render.Renderer + func GetOrganizationByID(ctx context.Context, organizationRepo repository.OrganizationRepository, ...) (*entity.Organization, error) + func GetProjectByID(ctx context.Context, projectRepo repository.ProjectRepository, id uint) (*entity.Project, error) + func GetSourceByID(ctx context.Context, sourceRepo repository.SourceRepository, id uint) (*entity.Source, error) + func GetStackByID(ctx context.Context, stackRepo repository.StackRepository, id uint) (*entity.Stack, error) + func HandleResult(w http.ResponseWriter, r *http.Request, ctx context.Context, err error, ...) + func SuccessResponse(ctx context.Context, data any) render.Renderer + type Duration time.Duration + func (d Duration) MarshalJSON() (b []byte, err error) + type Payload interface + Decode func(*http.Request) error + type Response struct + CostTime Duration + Data any + EndTime *time.Time + Message string + StartTime *time.Time + Success bool + TraceID string + func (rep *Response) Render(w http.ResponseWriter, r *http.Request) error