summaryrefslogtreecommitdiff
path: root/vendor/github.com/coreos/stream-metadata-go/fedoracoreos/fcos.go
blob: 9ffc7f7d1d3a19ef187fd628ef8cb48597d100fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Package fedoracoreos contains APIs defining well-known
// streams for Fedora CoreOS and a method to retrieve
// the URL for a stream endpoint.
package fedoracoreos

import (
	"fmt"
	"net/url"

	"github.com/coreos/stream-metadata-go/fedoracoreos/internals"
)

const (
	// StreamStable is the default stream
	StreamStable = "stable"
	// StreamTesting is what is intended to land in stable
	StreamTesting = "testing"
	// StreamNext usually tracks the next Fedora major version
	StreamNext = "next"
)

// GetStreamURL returns the URL for the given stream
func GetStreamURL(stream string) url.URL {
	u := internals.GetBaseURL()
	u.Path = fmt.Sprintf("streams/%s.json", stream)
	return u
}