core

package
v0.0.0-...-75dfb8e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2016 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package core handles the main operations of the Red October server.

Copyright (c) 2013 CloudFlare, Inc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(jsonIn []byte) ([]byte, error)

Create processes a create request.

func CreateUser

func CreateUser(jsonIn []byte) ([]byte, error)

CreateUser processes a create-user request.

func Decrypt

func Decrypt(jsonIn []byte) ([]byte, error)

Decrypt processes a decrypt request.

func Delegate

func Delegate(jsonIn []byte) ([]byte, error)

Delegate processes a delegation request.

func Encrypt

func Encrypt(jsonIn []byte) ([]byte, error)

Encrypt processes an encrypt request.

func Export

func Export(jsonIn []byte) ([]byte, error)

Export returns a backed up vault.

func Init

func Init(path string, config *config.Config) error

Init reads the records from disk from a given path

func Modify

func Modify(jsonIn []byte) ([]byte, error)

Modify processes a modify request.

func Order

func Order(jsonIn []byte) (out []byte, err error)

Order will request delegations from other users.

func OrderCancel

func OrderCancel(jsonIn []byte) (out []byte, err error)

OrderCancel will cancel an order given an order num

func OrderInfo

func OrderInfo(jsonIn []byte) (out []byte, err error)

OrderInfo will return a list of currently outstanding order numbers.

func OrdersOutstanding

func OrdersOutstanding(jsonIn []byte) (out []byte, err error)

OrdersOutstanding will return a list of currently outstanding orders.

func Owners

func Owners(jsonIn []byte) ([]byte, error)

Owners processes a owners request.

func Password

func Password(jsonIn []byte) ([]byte, error)

Password processes a password change request.

func Purge

func Purge(jsonIn []byte) ([]byte, error)

Purge processes a delegation purge request.

func ReEncrypt

func ReEncrypt(jsonIn []byte) ([]byte, error)

ReEncrypt processes an Re-encrypt request.

func ResetPersisted

func ResetPersisted(jsonIn []byte) (out []byte, err error)

ResetPersisted clears the persisted user data from the server. This request requires an admin.

func Restore

func Restore(jsonIn []byte) (out []byte, err error)

Restore attempts a restoration of the persistence store.

func Status

func Status(jsonIn []byte) (out []byte, err error)

Status returns the current delegation persistence state. In the future, this may return more data.

func Summary

func Summary(jsonIn []byte) ([]byte, error)

Summary processes a summary request.

Types

type CreateRequest

type CreateRequest struct {
	Name     string
	Password string
}

type CreateUserRequest

type CreateUserRequest struct {
	Name        string
	Password    string
	UserType    string
	HipchatName string
}

type DecryptRequest

type DecryptRequest struct {
	Name     string
	Password string

	Data []byte
}

type DecryptWithDelegates

type DecryptWithDelegates struct {
	Data      []byte
	Secure    bool
	Delegates []string
}

type DelegateRequest

type DelegateRequest struct {
	Name     string
	Password string

	Uses   int
	Time   string
	Slot   string
	Users  []string
	Labels []string
}

type EncryptRequest

type EncryptRequest struct {
	Name     string
	Password string

	Minimum     int
	Owners      []string
	LeftOwners  []string
	RightOwners []string
	Predicate   string

	Data []byte

	Labels []string
}

type ExportRequest

type ExportRequest struct {
	Name     string
	Password string
}

type ModifyRequest

type ModifyRequest struct {
	Name     string
	Password string

	ToModify string
	Command  string
}

type OrderCancelRequest

type OrderCancelRequest struct {
	Name     string
	Password string

	OrderNum string
}

type OrderInfoRequest

type OrderInfoRequest struct {
	Name     string
	Password string

	OrderNum string
}

type OrderOutstandingRequest

type OrderOutstandingRequest struct {
	Name     string
	Password string
}

type OrderRequest

type OrderRequest struct {
	Name          string
	Password      string
	Duration      string
	Uses          int
	Users         []string
	EncryptedData []byte
	Labels        []string
}

type OwnersData

type OwnersData struct {
	Status    string
	Owners    []string
	Predicate string
}

type OwnersRequest

type OwnersRequest struct {
	Data []byte
}

type PasswordRequest

type PasswordRequest struct {
	Name     string
	Password string

	NewPassword string
	HipchatName string
}

type PurgeRequest

type PurgeRequest struct {
	Name     string
	Password string
}

type ReEncryptRequest

type ReEncryptRequest EncryptRequest

type ResponseData

type ResponseData struct {
	Status   string
	Response []byte `json:",omitempty"`
}

type StatusData

type StatusData struct {
	Status string
}

type StatusRequest

type StatusRequest struct {
	Name     string
	Password string
}

type SummaryData

type SummaryData struct {
	Status string
	State  string
	Live   map[string]keycache.ActiveUser
	All    map[string]passvault.Summary
}

type SummaryRequest

type SummaryRequest struct {
	Name     string
	Password string
}

Jump to

Keyboard shortcuts

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