Documentation ¶
Index ¶
- type AuthCtxKey
- type BodyCtxKey
- type Env
- type Health
- type Home
- type JWTClaims
- type M
- type ParamsCtxKey
- type Reply
- type Response
- type Social
- type Twitter
- type TwitterAuthError
- type TwitterAuthResponse
- type TwitterDeleteTweetResponse
- type TwitterEmbedResponse
- type TwitterLikeTweetResponse
- type TwitterListResponse
- type TwitterListTweetsResponse
- type TwitterMessageResponse
- type TwitterResponse
- type TwitterRetweetResponse
- type TwitterTweetError
- type TwitterTweetResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCtxKey ¶
type AuthCtxKey struct{}
type BodyCtxKey ¶
type BodyCtxKey struct{}
type Env ¶
type Env struct { //Port for the server to listen on Port string `env:"PORT"` //MongoDBURI is the monogoDB connection string for the app MongoDBURI string `env:"MONGO_DB_URI"` //MongoDBName is the MongoDB database name for the app MongoDBName string `env:"MONGO_DB_NAME"` // TwitterClientID is the twitter client id TwitterClientID string `env:"TWITTER_CLIENT_ID"` // TwitterClientSecret is the twitter client secret TwitterClientSecret string `env:"TWITTER_CLIENT_SECRET"` // TwitterAPIKey is the twitter api key TwitterAPIKey string `env:"TWITTER_API_KEY"` // TwitterAPISecretKey is the twitter api secret key TwitterAPISecretKey string `env:"TWITTER_API_SECRET_KEY"` // TwitterAccessToken is the twitter access token TwitterAccessToken string `env:"TWITTER_ACCESS_TOKEN"` // TwitterBearerToken is the twitter bearer token TwitterBearerToken string `env:"TWITTER_BEARER_TOKEN"` // TwitterAccessTokenSecret is the twitter access token secret TwitterAccessTokenSecret string `env:"TWITTER_ACCESS_TOKEN_SECRET"` // TwitterRedirectURL is the twitter redirect url TwitterRedirectURL string `env:"TWITTER_REDIRECT_URL"` // JWTSecret is the jwt secret JWTSecret string `env:"JWT_SECRET"` // AppName is the app name AppName string `env:"APP_NAME"` }
type ParamsCtxKey ¶
type ParamsCtxKey struct{}
type Reply ¶
type Reply struct { MID primitive.ObjectID `json:"-" bson:"_id,omitempty"` ID string `json:"id" bson:"id"` // twitter id Text string `json:"text" bson:"text"` Username string `json:"username" bson:"username"` TweetID string `json:"tweet_id" bson:"tweet_id"` FText string `json:"f_text" bson:"f_text"` Giveaway primitive.ObjectID `json:"giveaway" bson:"giveaway"` ConversationID string `json:"conversation_id" bson:"conversation_id"` Claimed bool `json:"claimed" bson:"claimed"` }
type Twitter ¶
type Twitter struct { ID string `json:"id" bson:"id"` Username string `json:"username" bson:"username"` AccessToken string `json:"access_token " bson:"access_token"` RefreshToken string `json:"refresh_token" bson:"refresh_token"` TokenType string `json:"token_type" bson:"token_type"` RetrievedAt time.Time `json:"retrieved_at" bson:"retrieved_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` }
type TwitterAuthError ¶
type TwitterAuthResponse ¶
type TwitterDeleteTweetResponse ¶
type TwitterDeleteTweetResponse struct { Data struct { Deteted bool `json:"deleted"` } `json:"data"` }
type TwitterEmbedResponse ¶
type TwitterLikeTweetResponse ¶
type TwitterLikeTweetResponse struct { Data struct { Liked bool `json:"liked"` } `json:"data"` }
type TwitterListResponse ¶
type TwitterListResponse struct { Data []struct { ID string `json:"id"` Name string `json:"name"` Username string `json:"username"` AuthorID string `json:"author_id"` Text string `json:"text"` ConversationID string `json:"conversation_id"` } Meta struct { ResultCount *int `json:"result_count"` NextToken string `json:"next_token"` } Includes struct { Users []struct { ID string `json:"id"` Name string `json:"name"` Username string `json:"username"` } `json:"users"` } `json:"includes"` }
type TwitterListTweetsResponse ¶
type TwitterListTweetsResponse struct { Data []struct { ID string `json:"id"` Text string `json:"text"` CreatedAt string `json:"created_at"` } `json:"data"` Meta struct { NewestID string `json:"newest_id"` OldestID string `json:"oldest_id"` ResultCount int `json:"result_count"` NextToken string `json:"next_token"` } `json:"meta"` }
type TwitterMessageResponse ¶
type TwitterResponse ¶
type TwitterResponse struct { Data struct { ID string `json:"id"` Name string `json:"name"` Username string `json:"username"` PublicMetrics struct { FollowersCount int64 `json:"followers_count"` FollowingCount int64 `json:"following_count"` TweetCount int64 `json:"tweet_count"` } `json:"public_metrics"` } `json:"data"` }
type TwitterRetweetResponse ¶
type TwitterRetweetResponse struct { Data struct { Retweeted bool `json:"retweeted"` } `json:"data"` }
type TwitterTweetError ¶
type TwitterTweetError struct { Errors []struct { Value string `json:"value"` Title string `json:"title"` Detail string `json:"detail"` Parameter string `json:"parameter"` Message string `json:"message"` Type string `json:"type"` } `json:"errors"` Title string `json:"title"` Detail string `json:"detail"` Message string `json:"message"` Parameter string `json:"parameter"` Type string `json:"type"` }
type TwitterTweetResponse ¶
Click to show internal directories.
Click to hide internal directories.