ssh

package
v0.0.0-...-fb315dc Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 38 Imported by: 0

README

SSH

  • Allows for the execution of remote commands via a rest request

Environment Variables

ENCRYPTION_KEY - key used to excrypt important information

REST

Add Command
Add Key
Execute Command

Documentation

Overview

Package ssh is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHandler

func MakeHandler(service Service, logger kitlog.Logger, ml machineLearning.Service) http.Handler

MakeHandler retuns a http rest request handler for sensu the machine learning service can be nil if you do not wish to save the request message

func NewCommand

func NewCommand(store Store,
	stateStore telegram.Store,
	telegram telegram.Service) telegram.Command

func NewSSHExecute

func NewSSHExecute(service Service,
	store Store,
	telegramStore telegram.Store,
	telegramService telegram.Service) telegram.Commandlet

func NewSshSelectCommand

func NewSshSelectCommand(store Store,
	telegramStore telegram.Store,
	telegramService telegram.Service) telegram.Commandlet

Types

type MockService

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

MockService is a mock of Service interface

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockService) ExecuteRemoteCommand

func (m *MockService) ExecuteRemoteCommand(ctx context.Context, chatId uint32, commandName, address string) error

ExecuteRemoteCommand mocks base method

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService

func (*MockServiceMockRecorder) ExecuteRemoteCommand

func (mr *MockServiceMockRecorder) ExecuteRemoteCommand(ctx, chatId, commandName, address interface{}) *gomock.Call

ExecuteRemoteCommand indicates an expected call of ExecuteRemoteCommand

type Service

type Service interface {
	ExecuteRemoteCommand(ctx context.Context, chatId uint32, commandName, address string) error
	// contains filtered or unexported methods
}

func NewInstrumentService

func NewInstrumentService(counter metrics.Counter, latency metrics.Histogram, s Service) Service

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service) Service

func NewService

func NewService(alert alert.Service, store Store) Service

type Store

type Store interface {
	// contains filtered or unexported methods
}

func NewMongoStore

func NewMongoStore(db *mgo.Database) Store

Jump to

Keyboard shortcuts

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