Documentation
¶
Index ¶
- func Feature(instrumentationFactory request.InstrumentationFactory, ...) router.Handle
- func LongLink(instrumentationFactory request.InstrumentationFactory, ...) router.Handle
- func SSOSignIn(singleSignOn sso.SingleSignOn, webFrontendURL string) router.Handle
- func SSOSignInCallback(singleSignOn sso.SingleSignOn, webFrontendURL url.URL) router.Handle
- func Search(instrumentationFactory request.InstrumentationFactory, searcher search.Search, ...) router.Handle
- func ServeDir(dir string) router.Handle
- func ServeFile(fileName string) router.Handle
- func Track(instrumentationFactory request.InstrumentationFactory) router.Handle
- type Filter
- type SearchRequest
- type SearchResponse
- type ShortLink
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Feature ¶
func Feature( instrumentationFactory request.InstrumentationFactory, featureDecisionMakerFactory feature.DecisionMakerFactory, authenticator authenticator.Authenticator, ) router.Handle
Feature retrieves the status of feature toggle.
func LongLink ¶
func LongLink( instrumentationFactory request.InstrumentationFactory, shortLinkRetriever shortlink.Retriever, timer timer.Timer, webFrontendURL url.URL, ) router.Handle
LongLink translates alias to the original long link.
func SSOSignIn ¶
func SSOSignIn( singleSignOn sso.SingleSignOn, webFrontendURL string, ) router.Handle
SSOSignIn redirects user to the sign in page.
func SSOSignInCallback ¶
SSOSignInCallback generates Short's authentication token given identity provider's authorization code.
func Search ¶
func Search( instrumentationFactory request.InstrumentationFactory, searcher search.Search, authenticator authenticator.Authenticator, ) router.Handle
Search fetches resources under certain criteria.
Types ¶
type Filter ¶
Filter represents the filter field received from Search API.
func (*Filter) UnmarshalJSON ¶
UnmarshalJSON parses json into Filter.
type SearchRequest ¶
SearchRequest represents the request received from Search API.
type SearchResponse ¶
type SearchResponse struct { ShortLinks []ShortLink `json:"short_links,omitempty"` Users []User `json:"users,omitempty"` }
SearchResponse represents the response to the Search API request.
type ShortLink ¶
type ShortLink struct { Alias string `json:"alias,omitempty"` LongLink string `json:"long_link,omitempty"` ExpireAt *time.Time `json:"expire_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
ShortLink represents the short_link field of Search API respond.
type User ¶
type User struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` LastSignedInAt *time.Time `json:"last_signed_in_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
User represents the user field of Search API respond.
Click to show internal directories.
Click to hide internal directories.