common

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: BSD-3-Clause Imports: 3 Imported by: 44

Documentation

Index

Constants

View Source
const (
	TnsProtocol  = "/tns/v1"
	SeerProtocol = "/seer/v1"
)
View Source
const (
	Auth      = "auth"
	Patrick   = "patrick"
	Monkey    = "monkey"
	TNS       = "tns"
	Hoarder   = "hoarder"
	Substrate = "substrate"
	Seer      = "seer"
	Gateway   = "gateway"
)

Variables

View Source
var (
	Protocols          = []string{Auth, Patrick, Monkey, TNS, Hoarder, Substrate, Seer, Gateway}
	HTTPProtocols      = []string{Patrick, Substrate, Seer, Auth, Gateway}
	P2PStreamProtocols = []string{Seer, Auth, Patrick, TNS, Monkey, Hoarder, Substrate}
)
View Source
var DefaultBranch = "master"

TODO remove this and iterate, default branch should be gathered from a given repository

Functions

func ValidateProtocols added in v0.10.6

func ValidateProtocols(protocols []string, ops ...ValidateOption) error

Types

type PathVariable

type PathVariable string
const (
	ProjectPathVariable     PathVariable = "projects"
	ApplicationPathVariable PathVariable = "applications"
	ProjectIndexVariable    PathVariable = "project"

	LinksPathVariable         PathVariable = "links"
	BranchPathVariable        PathVariable = "branches"
	CommitPathVariable        PathVariable = "commit"
	CurrentCommitPathVariable PathVariable = "current"
)

func (PathVariable) String

func (pv PathVariable) String() string

type TnsPath

type TnsPath struct {
	// contains filtered or unexported fields
}

func Current

func Current(projectId, branch string) *TnsPath

func NewTnsPath

func NewTnsPath(value []string) *TnsPath

func (*TnsPath) Slice

func (_path *TnsPath) Slice() []string

func (*TnsPath) String

func (_path *TnsPath) String() string

func (*TnsPath) Versioning

func (_path *TnsPath) Versioning() *VersioningPath

type ValidateOption added in v0.10.8

type ValidateOption func(string) error

func ValidateHttp added in v0.10.8

func ValidateHttp() ValidateOption

func ValidateP2P added in v0.10.8

func ValidateP2P() ValidateOption

type VersioningPath

type VersioningPath struct {
	*TnsPath
}

func (*VersioningPath) Commit

func (b *VersioningPath) Commit(commit string) *TnsPath
func (b *VersioningPath) Links() *TnsPath

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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