core

package
v0.0.0-...-7e7fb06 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ServerSoftware = "cmd.io"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name        string
	User        string
	Source      string
	Environment map[string]string `dynamodbav:",omitempty"`
	ACL         []string          `dynamodbav:",stringset,omitempty"`
	Admins      []string          `dynamodbav:",stringset,omitempty"`
	Description string            `dynamodbav:",omitempty"`

	Changed bool `dynamodbav:"-"`
	// contains filtered or unexported fields
}

Command is a the definition for a runnable command on cmd

func (*Command) Build

func (c *Command) Build() error

func (*Command) Docker

func (c *Command) Docker() *dockerbox.Client

Docker will return a configured docker client

func (*Command) Env

func (c *Command) Env() (env []string)

Env returns config in a `k=v` format without any cmd specific keys

func (*Command) HasAccess

func (c *Command) HasAccess(user string) bool

func (*Command) IsAdmin

func (c *Command) IsAdmin(user string) bool

func (*Command) Pull

func (c *Command) Pull(ctx context.Context) error

Pull and tag image for command

func (*Command) Run

func (c *Command) Run(sess ssh.Session, args []string) int

Run a command in a container attaching input/output to ssh session

func (*Command) SetEnv

func (c *Command) SetEnv(key, val string)

SetEnv for command

type Token

type Token struct {
	Key         string
	Description string
	User        string
	LastUsedIP  string
	LastUsedOn  time.Time
}

Token used to provide access to non-github users

func (*Token) Validate

func (t *Token) Validate() error

Jump to

Keyboard shortcuts

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