secrets

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Creates lua user data secret_ud.

Golang

	state := lua.NewState()
	secrets.Preload(state)
	s := secrets.New(filename)
	// register user data "secrets"
	s.Register(state, "secrets")

Lua

secret:get(key)

Get secret, return string or nil.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Preload

func Preload(L *lua.LState) int

Preload is the preloader of user data secret_ud.

Types

type Storage

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

Storage for secrets

func New

func New(filename string) *Storage

New return new Secret

func (*Storage) Read

func (s *Storage) Read()

Read secrets from file

func (*Storage) Register

func (s *Storage) Register(L *lua.LState, userDataName string)

Register secrets_ud in state

Jump to

Keyboard shortcuts

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