repository

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID            int
	Role          AccountRole
	SlackID       string
	SlackRealName string
}

Account ...

type AccountRole

type AccountRole int

AccountRole ...

const (

	// AdminRole ...
	AdminRole AccountRole

	// AgentRole ...
	AgentRole
)

type Service

type Service interface {
	GetAccountByID(id int) (*Account, error)
	GetAccountBySlackID(slackID string) (*Account, error)
	GetAccountBySlackRealName(slackRealName string) (*Account, error)
	GetAccounts() ([]Account, error)
	CreateAccount(account *Account) error
	PutAccount(account *Account) error
	DeleteAccount(id int) error

	GetShellcodeByID(id int) (*Shellcode, error)
	GetShellcodeByKey(key string) (*Shellcode, error)
	GetShellcodes() ([]Shellcode, error)
	CreateShellcode(shellcode *Shellcode) error
	PutShellcode(shellcode *Shellcode) error
	DeleteShellcode(id int) error

	GetSessionByID(id string) (*Session, error)
	CreateSession(session *Session) error
	PutSession(session *Session) error
	DeleteSession(id string) error

	GetVersion() (int, error)
	PutVersion(version int) error

	Init() error
	Close() error
}

Service ...

func NewService

func NewService(dbPath string) (Service, error)

NewService ...

type Session

type Session struct {
	ID  string
	Key string
}

Session ...

type Shellcode

type Shellcode struct {
	ID            int
	FileID        string
	ShellKey      string
	Endpoint      string
	Type          string
	OwnerID       string
	OwnerRealName string
}

Shellcode ...

Jump to

Keyboard shortcuts

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