Documentation
¶
Index ¶
- func JWTDecode(token string, publicKey *rsa.PublicKey) (jwt.MapClaims, error)
- func JWTEncode(claims jwt.MapClaims, privateKey *rsa.PrivateKey) (string, error)
- func JWTToken(authorizationToken string) (string, error)
- func NewAWSSession(awsID string, awsKey string, awsRegion string) (*session.Session, error)
- func NewPostgresSession(dbHost string, dbPort string, dbUser string, dbPass string, dbName string, ...) (*sql.DB, error)
- func NewRouter(assetsPath string) (*gin.Engine, error)
- func PostgresMigrate(db *sql.DB, rollback bool) error
- func RSAPrivateFile() (*rsa.PrivateKey, error)
- func RSAPublicFile() (*rsa.PublicKey, error)
- func RSAPublicUrl(pemURL string) (*rsa.PublicKey, error)
- type Auth0Handler
- type CWLHandler
- type DynamoHandler
- type LoggerHandler
- type OpHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAWSSession ¶ added in v0.5.0
func NewPostgresSession ¶ added in v0.13.8
func RSAPrivateFile ¶ added in v0.14.0
func RSAPrivateFile() (*rsa.PrivateKey, error)
func RSAPublicFile ¶ added in v0.14.0
Types ¶
type Auth0Handler ¶ added in v0.15.0
type Auth0Handler interface {
RoleList() ([]*management.Role, error)
RoleShow(id string) (*management.Role, *management.UserList, error)
RoleCreate(name string, description string) error
RoleUpdate(id string, name string, description string) error
RoleDelete(id string) error
UserList() ([]*management.User, error)
UserShow(id string) (*management.User, error)
UserCreate(name string, email string) (string, error)
UserUpdate(id string, name string, email string, passreset bool) error
UserBlock(id string) error
UserDelete(id string) error
PassReset(email string) error
}
func NewAuth0Session ¶ added in v0.14.2
type CWLHandler ¶
type CWLHandler interface {
Write(msg string) error
Get(limit int64) (*cloudwatchlogs.GetLogEventsOutput, error)
}
func NewCloudwatchLogSess ¶ added in v0.5.0
type DynamoHandler ¶
type DynamoHandler interface {
List(filter expression.ConditionBuilder, projection expression.ProjectionBuilder) ([]map[string]interface{}, error)
Create(map[string]interface{}) error
Show(key map[string]*dynamodb.AttributeValue) (map[string]interface{}, error)
Delete(key map[string]*dynamodb.AttributeValue) error
}
func NewDynamoDBSession ¶ added in v0.5.0
func NewDynamoDBSession(sess *session.Session, table string) (DynamoHandler, error)
type LoggerHandler ¶ added in v0.6.0
func NewZapLogger ¶ added in v0.6.0
func NewZapLogger() (LoggerHandler, error)
Click to show internal directories.
Click to hide internal directories.