Documentation ¶
Index ¶
- func AdminSP(next http.Handler) http.Handler
- func AuthM(next http.Handler) http.Handler
- func AuthRefreshSP(next http.Handler) http.Handler
- func AuthSP(next http.Handler) http.Handler
- func CheckM(next http.Handler) http.Handler
- func CheckSP(next http.Handler) http.Handler
- func CreateSignedSPTokens(phone, userID string) (string, string, error)
- func CreateSignedToken(username, userID string) (string, error)
- func ExtractTags(tweet string) ([]string, error)
- func WriteData(rw http.ResponseWriter, status int, data interface{})
- func WriteError(rw http.ResponseWriter, status int, errorStr string)
- type AWS
- func (awsMgr *AWS) CreateSignedGetUrl(bucket, name string, expiry time.Duration) (string, map[string]string, error)
- func (awsMgr *AWS) CreateSignedPutUrl(bucket, name string, expiry time.Duration) (string, map[string]string, error)
- func (awsMgr *AWS) GetSPBucketSize(bucket, userID string) (uint64, int, error)
- type Claims
- type FontDetails
- type SPClaims
- type ThreadDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminSP ¶
AdminSP delete SP_USER header and then repopulate with an empty value if unauthenticated, returns 401 or 403 if failure and does not proceed to handler.
func AuthM ¶
AuthM delete TRIBIST_USER header and then repopulate with an empty value if unauthenticated, returns 401 or 403 if failure and does not proceed to handler.
func AuthRefreshSP ¶
AuthRefreshSP delete SP_USER header and then repopulate with an empty value if unauthenticated, returns 401 or 403 if failure and does not proceed to handler. This middleware expects a refresh token, It will return 403 for access token.
func AuthSP ¶
AuthSP delete SP_USER header and then repopulate with an empty value if unauthenticated, returns 401 or 403 if failure and does not proceed to handler.
func CheckM ¶
CheckM will delete the TRIBIST_USER and will try and parse the TRIBIST_JWT header. If successful will set TRIBIST_USER. Even if authentication fails this middleware will call the handler.
func CheckSP ¶
CheckSP will delete the SP_USER and will try and parse the SP_JWT header. If successful will set TRIBIST_USER. Even if authentication fails this middleware will call the handler.
func CreateSignedToken ¶
func ExtractTags ¶
func WriteData ¶
func WriteData(rw http.ResponseWriter, status int, data interface{})
func WriteError ¶
func WriteError(rw http.ResponseWriter, status int, errorStr string)
Types ¶
type FontDetails ¶
type FontDetails struct {
Name string
}
func ExtractFonts ¶
func ExtractFonts(tweet string) ([]*FontDetails, error)
ExtractThreads The format is #font:<name of font>
type ThreadDetails ¶
func ExtractThreads ¶
func ExtractThreads(tweet string) ([]*ThreadDetails, error)
ExtractThreads The format is #thread:<uuid of thread>:<0 indexed sequence number>