secretify

package module
v0.0.0-...-9828505 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

README

Alt text

A secure way to transfer or share secrets.

Project Status

Secretify is now maintained by Gravitir. Track the current status here.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • npm
  • go

Installation

  1. Clone the repo
    git clone https://github.com/DarioCalovic/secretify.git
    
  2. Install NPM packages
    npm install --prefix ./ui
    
  3. Run API
    go run cmd/api.go
    
  4. Run UI
    npm run dev --prefix ./ui
    
  5. Open http://localhost:3000 in browser

Roadpmap

  • First commit
  • CI/CD pipeline
  • Release stable version
  • ..more to come

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

License

Distributed under the GNU License. See LICENSE.txt for more information.

Acknowledgments

Our thanks are extended but not limited to the following people:

Documentation

Index

Constants

View Source
const AllowedFileExtensions = "" // comma separated, e.g. "jpeg,jpg,gif,png,eps,raw,tif,tiff,bmp,log,txt,key,pem,csv"

AllowedFileExtensions default allowed file extensions

View Source
const MaxFileSize = 5242880 // 5 MB

MaxFileSize default max file size

Variables

View Source
var (
	// ErrGeneric is used for testing purposes and for errors handled later in the callstack
	ErrGeneric = errors.New("generic error")

	// ErrRecordNotFound (404) is returned when a record was not found
	ErrRecordNotFound = errors.New("record not found")

	ErrForbidden = errors.New("forbidden to access resource")

	// ErrUnauthorized (401) is returned when user is not authorized
	ErrUnauthorized = errors.New(http.StatusText(http.StatusUnauthorized))
)

Functions

This section is empty.

Types

type AuthToken

type AuthToken struct {
	Token        string `json:"token"`
	RefreshToken string `json:"refresh_token"`
}

AuthToken holds authentication token details with refresh token

type Base

type Base struct {
	ID        int       `json:"id" gorm:"primarykey"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at,omitempty" gorm:"index"`
}

Base contains common fields for all tables

type File

type File struct {
	Base
	Identifier string `gorm:"unique"`
	Path       string
	Name       string
	Type       string
	Size       uint
}

type HTTPErrorResponse

type HTTPErrorResponse struct {
	Error string `json:"error"`
}

type HTTPOKResponse

type HTTPOKResponse struct {
	Data interface{} `json:"data"`
}

type MetaSetting

type MetaSetting struct {
	Hoster string `json:"hoster"`
}

type PolicySetting

type PolicySetting struct {
}

type Secret

type Secret struct {
	Base
	Identifier string `gorm:"unique"`

	// Cipher attributes
	Cipher string

	// Policy attributes
	ExpiresAt     time.Time
	HasPassphrase bool
	RevealOnce    bool
	DestroyManual bool

	// File attributes
	FileID int
	File   File `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

Jump to

Keyboard shortcuts

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