Documentation ¶
Index ¶
- Constants
- func AccessTokenDecoder() *aclcore.AccessTokenDecoder
- func BootstrapArchiveDomain() archive.AsyncJobAdapter
- func BootstrapCatalogAndArchiveDomains() archive.AsyncJobAdapter
- func BootstrapCatalogDomain()
- func BootstrapOAuthDomain()
- func GetIdentityQueries() *aclcore.IdentityQueries
- func MustAWSFactory(ctx context.Context) awsfactory.AWSFactory
- func NewAuthenticators() (*aclcore.SSOAuthenticator, *aclcore.RefreshTokenAuthenticator)
- func NewLogout() *aclcore.Logout
- type ArgParser
- func (a *ArgParser) BadRequest() (Response, error)
- func (a *ArgParser) HasViolations() bool
- func (a *ArgParser) ReadPathParameterInt(key string) int
- func (a *ArgParser) ReadPathParameterString(key string) string
- func (a *ArgParser) ReadQueryParameterBool(key string, mandatory bool) bool
- func (a *ArgParser) ReadQueryParameterInt(key string, mandatory bool) int
- type LambdaViperNames
- type Response
- func BadRequest(body interface{}) (Response, error)
- func ForbiddenResponse(message string) (Response, error)
- func HandleError(err error) (Response, error)
- func InternalError(cause error) (Response, error)
- func NewJsonResponse(code int, body interface{}, headers map[string]string) (Response, error)
- func NoContent() (Response, error)
- func NotFound(body interface{}) (Response, error)
- func Ok(body interface{}) (Response, error)
- func RequiresAuthenticated(request *events.APIGatewayV2HTTPRequest, ...) (Response, error)
- func UnauthorizedResponse(message string) (Response, error)
Constants ¶
View Source
const ( JWTIssuer = "DPHOTO_JWT_ISSUER" JWTKeyB64 = "DPHOTO_JWT_KEY_B64" JWTValidity = "DPHOTO_JWT_VALIDITY" RefreshTokenValidity = "DPHOTO_REFRESH_TOKEN_VALIDITY" DynamoDBTableName = "CATALOG_TABLE_NAME" StorageBucketName = "STORAGE_BUCKET_NAME" CacheBucketName = "CACHE_BUCKET_NAME" SNSArchiveARN = "SNS_ARCHIVE_ARN" SQSArchiveURL = "SQS_ARCHIVE_URL" )
Variables ¶
This section is empty.
Functions ¶
func AccessTokenDecoder ¶
func AccessTokenDecoder() *aclcore.AccessTokenDecoder
func BootstrapArchiveDomain ¶
func BootstrapArchiveDomain() archive.AsyncJobAdapter
func BootstrapCatalogAndArchiveDomains ¶
func BootstrapCatalogAndArchiveDomains() archive.AsyncJobAdapter
BootstrapCatalogAndArchiveDomains bootstraps all domains
func BootstrapCatalogDomain ¶
func BootstrapCatalogDomain()
BootstrapCatalogDomain bootstraps both oauth and catalog
func GetIdentityQueries ¶
func GetIdentityQueries() *aclcore.IdentityQueries
func MustAWSFactory ¶
func MustAWSFactory(ctx context.Context) awsfactory.AWSFactory
func NewAuthenticators ¶
func NewAuthenticators() (*aclcore.SSOAuthenticator, *aclcore.RefreshTokenAuthenticator)
Types ¶
type ArgParser ¶
type ArgParser struct {
// contains filtered or unexported fields
}
ArgParser is a helper to read several parameters from the request
func NewArgParser ¶
func NewArgParser(request *events.APIGatewayV2HTTPRequest) *ArgParser
func (*ArgParser) BadRequest ¶
func (*ArgParser) HasViolations ¶
func (*ArgParser) ReadPathParameterInt ¶
func (*ArgParser) ReadPathParameterString ¶
func (*ArgParser) ReadQueryParameterBool ¶
type LambdaViperNames ¶
type LambdaViperNames struct{}
func (*LambdaViperNames) ArchiveCacheBucketName ¶
func (l *LambdaViperNames) ArchiveCacheBucketName() string
func (*LambdaViperNames) ArchiveJobsSNSARN ¶
func (l *LambdaViperNames) ArchiveJobsSNSARN() string
func (*LambdaViperNames) ArchiveJobsSQSURL ¶
func (l *LambdaViperNames) ArchiveJobsSQSURL() string
func (*LambdaViperNames) ArchiveMainBucketName ¶
func (l *LambdaViperNames) ArchiveMainBucketName() string
func (*LambdaViperNames) DynamoDBName ¶
func (l *LambdaViperNames) DynamoDBName() string
type Response ¶
type Response events.APIGatewayProxyResponse
func BadRequest ¶
func ForbiddenResponse ¶
func HandleError ¶
func InternalError ¶
InternalError logs the error and create a 500 error response
func NewJsonResponse ¶
NewJsonResponse serialises body into JSON and create a Response containing it as body.
func RequiresAuthenticated ¶
func RequiresAuthenticated(request *events.APIGatewayV2HTTPRequest, process func(user usermodel.CurrentUser) (Response, error)) (Response, error)
func UnauthorizedResponse ¶
Click to show internal directories.
Click to hide internal directories.