Documentation
¶
Index ¶
- Constants
- func AbortWithProblemDetail(c *gin.Context, p rfc7807.Problem)
- func AddSablierHeader(c *gin.Context, session *sablier.SessionState)
- func Healthcheck(router *gin.RouterGroup, ctx context.Context)
- func ListThemes(router *gin.RouterGroup, s *ServeStrategy)
- func ProblemError(e error) rfc7807.Problem
- func ProblemGroupNotFound(e sablier.ErrGroupNotFound) rfc7807.Problem
- func ProblemThemeNotFound(e theme.ErrThemeNotFound) rfc7807.Problem
- func ProblemValidation(e error) rfc7807.Problem
- func StartBlocking(router *gin.RouterGroup, s *ServeStrategy)
- func StartDynamic(router *gin.RouterGroup, s *ServeStrategy)
- type BlockingRequest
- type DynamicRequest
- type Health
- type Sablier
- type ServeStrategy
Constants ¶
View Source
const SablierStatusHeader = "X-Sablier-Session-Status"
View Source
const SablierStatusNotReady = "not-ready"
View Source
const SablierStatusReady = "ready"
Variables ¶
This section is empty.
Functions ¶
func AddSablierHeader ¶
func AddSablierHeader(c *gin.Context, session *sablier.SessionState)
func Healthcheck ¶
func Healthcheck(router *gin.RouterGroup, ctx context.Context)
func ListThemes ¶
func ListThemes(router *gin.RouterGroup, s *ServeStrategy)
func ProblemError ¶
func ProblemGroupNotFound ¶
func ProblemGroupNotFound(e sablier.ErrGroupNotFound) rfc7807.Problem
func ProblemThemeNotFound ¶
func ProblemThemeNotFound(e theme.ErrThemeNotFound) rfc7807.Problem
func ProblemValidation ¶
func StartBlocking ¶
func StartBlocking(router *gin.RouterGroup, s *ServeStrategy)
func StartDynamic ¶
func StartDynamic(router *gin.RouterGroup, s *ServeStrategy)
Types ¶
type BlockingRequest ¶ added in v1.9.0
type DynamicRequest ¶ added in v1.9.0
type DynamicRequest struct {
Group string `form:"group"`
Names []string `form:"names"`
ShowDetails bool `form:"show_details"`
DisplayName string `form:"display_name"`
Theme string `form:"theme"`
SessionDuration time.Duration `form:"session_duration"`
RefreshFrequency time.Duration `form:"refresh_frequency"`
}
type Health ¶
type Health struct {
TerminatingStatusCode int `` /* 129-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Health) SetDefaults ¶
func (h *Health) SetDefaults()
func (*Health) WithContext ¶
type Sablier ¶ added in v1.9.0
type Sablier interface {
RequestSession(ctx context.Context, names []string, duration time.Duration) (*sablier.SessionState, error)
RequestSessionGroup(ctx context.Context, group string, duration time.Duration) (*sablier.SessionState, error)
RequestReadySession(ctx context.Context, names []string, duration time.Duration, timeout time.Duration) (*sablier.SessionState, error)
RequestReadySessionGroup(ctx context.Context, group string, duration time.Duration, timeout time.Duration) (*sablier.SessionState, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.