Documentation ¶
Index ¶
- Variables
- func FormatBuildVersion(version string, commit string, buildTime string) string
- type CacheConfig
- type Comment
- type Config
- type ExecuteTemplateFunc
- type GitHubConfig
- type Home
- type Image
- type Language
- type LastFM
- type LastFMConfig
- type LastFMResponse
- type LastFMTrack
- type LogConfig
- type Post
- type Project
- type Reply
- type Repositories
- type Server
- func (s *Server) Close()
- func (s *Server) FetchData(ctx context.Context) (*Variables, error)
- func (s *Server) FetchLastFM(ctx context.Context) LastFM
- func (s *Server) FetchRepositories(ctx context.Context, after string) (*Variables, error)
- func (s *Server) HighlightData(vars *Variables) error
- func (s *Server) Routes() http.Handler
- func (s *Server) Start()
- type Topic
- type User
- type Variables
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StyleDark = styles.Get("github-dark") StyleLight = styles.Get("github") )
Functions ¶
Types ¶
type CacheConfig ¶
func (CacheConfig) String ¶
func (c CacheConfig) String() string
type Config ¶
type Config struct { Log LogConfig `yaml:"log"` Debug bool `yaml:"debug"` DevMode bool `yaml:"dev_mode"` ListenAddr string `yaml:"listen_addr"` GitHub GitHubConfig `yaml:"github"` Cache *CacheConfig `yaml:"cache"` LastFM LastFMConfig `yaml:"lastfm"` }
func LoadConfig ¶
type GitHubConfig ¶
func (GitHubConfig) String ¶
func (c GitHubConfig) String() string
type LastFM ¶
type LastFM struct { Track *LastFMTrack URL string Error string }
type LastFMConfig ¶
type LastFMConfig struct { Username string `yaml:"username"` APIKey string `yaml:"api_key"` Size int `yaml:"size"` TTL time.Duration `yaml:"ttl"` }
func (LastFMConfig) String ¶
func (c LastFMConfig) String() string
type LastFMResponse ¶
type LastFMResponse struct { RecentTracks struct { Track []struct { Artist struct { URL string `json:"url"` Name string `json:"name"` Image Image `json:"image"` MbID string `json:"mbid"` } `json:"artist"` Date struct { Uts int64 `json:"uts,string"` Text string `json:"#text"` } `json:"date"` MbID string `json:"mbid"` Name string `json:"name"` Image Image `json:"image"` URL string `json:"url"` Streamable int `json:"streamable,string"` Album struct { MbID string `json:"mbid"` Text string `json:"#text"` } Loved int `json:"loved,string"` Attr struct { NowPlaying string `json:"nowplaying"` } `json:"@attr"` } } `json:"recenttracks"` Attr struct { User string `json:"user"` TotalPages int `json:"totalPages,string"` Page int `json:"page,string"` Total int `json:"total,string"` PerPage int `json:"perPage,string"` } `json:"@attr"` }
type LastFMTrack ¶
type LogConfig ¶
type Repositories ¶
type Repositories struct { Nodes []struct { Name string URL string Description string StargazerCount int ForkCount int PushedAt time.Time RepositoryTopics struct { Nodes []struct { Topic struct { Name string } URL string } } `graphql:"repositoryTopics(first: $topics)"` Languages struct { Nodes []struct { Name string Color string } } `graphql:"languages(first: 1, orderBy: {field: SIZE, direction: DESC})"` } PageInfo struct { EndCursor string HasNextPage bool } }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) FetchRepositories ¶
func (*Server) HighlightData ¶
Click to show internal directories.
Click to hide internal directories.