cistatus

package module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

README

Continuous Integration Status Server (and Clients)

Version Go Report Card license

License

Copyright 2017 Kevin Stock

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

View Source
const (
	Red     = Color("red")
	Yellow  = Color("yellow")
	Green   = Color("green")
	Unknown = Color("question")
)
View Source
const (
	Version = "0.2.2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name     string   `json:"name"`
	Commit   string   `json:"commit"`
	Statuses []Status `json:"statuses,omitempty"`
}

func (Branch) String

func (b Branch) String() string

type Client

type Client struct {
	HTTPClient http.Client
	Token      string

	Hostname string
	Port     int
	UseTLS   bool
}

func (*Client) Summary

func (c *Client) Summary(ctx context.Context) (*Summary, error)

func (*Client) Watch

func (c *Client) Watch(summChan chan Summary) error

type Color

type Color string

type Fetcher

type Fetcher interface {
	FetchStatus() ([]Project, error)
}

type Project

type Project struct {
	Name     string   `json:"name"`
	Branches []Branch `json:"branches,omitempty"`
}

func (Project) String

func (p Project) String() string

type Server

type Server struct {
	Logger *log.Logger

	JWT struct {
		Algorithm string
		Secret    []byte
	}

	*http.ServeMux
	// contains filtered or unexported fields
}

func NewServer added in v0.2.0

func NewServer(fetcher Fetcher, fetchInterval time.Duration) *Server

type Status

type Status struct {
	Name    string    `json:"name"`
	Status  string    `json:"status"`
	Created time.Time `json:"created"`
	Author  string    `json:"author"`
}

func (Status) String

func (s Status) String() string

type Summary

type Summary struct {
	Projects    []Project  `json:"projects,omitempty"`
	Color       Color      `json:"color"`
	LastUpdated *time.Time `json:"lastUpdated,omitempty"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL