Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goma

Control SESAME SmartLock by SESAME v2 API

Installation

As a library

go get github.com/ouest/goma

or if you want to use it as a bin command

go >= 1.17

go install github.com/ouest/goma/cmd/goma@latest

go < 1.17

go get github.com/ouest/goma/cmd/goma

Usage

Add your application configuration to your .env file in the root of your project:

SESAME_UUID=YOUR_SESAME_UUID
SESAME_API_KEY=YOUR_SESAME_API_KEY
SESAME_SECRET_KEY=YOUR_SERSAME_SECRET_KEY

Then in your Go app you can do something like

package main

import (
    "github.com/ouest/goma"
)

func main() {
    // get SESAME state
    state := goma.State()
    // get SESAME history
    history := goma.History(0, 10)
    // lock SESAME
    goma.Lock("account_name")
    // toggle SESAME
    goma.Toggle("account_name")
    // unlock SESAME
    goma.Unlock("account_name")
}

Command Mode

Assuming you've installed the command as above and you've got $GOPATH/bin in your $PATH

goma state
goma history -p 0 -n 10
goma lock account_name
goma toggle account_name
goma unlock account_name

License

See LICENSE © ouest

About

Control SESAME SmartLock by SESAME v2 API

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.