
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/no3371/go-skytable
A Go driver of Skytable, a fast, secure and reliable realtime NoSQL database.
The package implements Skyhash 1.1.
DDL actions implemented.
The interfaces may be changed anytime before first release.
go get github.com/No3371/go-skytable
Open single connection to a local Skytable instance
localAddr := &net.TCPAddr{IP: []byte{127, 0, 0, 1}, Port: int(protocol.DefaultPort)}
// Auth is disabled in the instance
c, err := skytable.NewConn(localAddr)
// or
auth := func() (u, t string) { // ⚠️ You don't really write AuthProvider like this! Never include your credential in code!
u = "USERNAME"
t = "TOKEN"
return u, t
}
c, err := skytable.NewConnAuth(localAddr, auth)
Open a connection pool to a local Skytable instance
localAddr := &net.TCPAddr{IP: []byte{127, 0, 0, 1}, Port: int(protocol.DefaultPort)}
// Auth is disabled in the instance
c := skytable.NewConnPool(localAddr, skytable.DefaultConnPoolOptions)
// or
auth := func() (u, t string) { // ⚠️ You don't really write AuthProvider like this! Never include your credential in code!
u = "USERNAME"
t = "TOKEN"
return u, t
}
c := skytable.NewConnPool(localAddr, skytable.ConnPoolOptions{
AuthProvider: auth,
})
Set a value
err := c.Set(ctx, "KEY", "VALUE")
Get a value
resp, err := c.Get(ctx, "KEY")
Multi-actions query
p := skytable.NewQueryPacket(
[]skytable.Action{
action.Del { Keys: []string{k} },
action.Set { Key: k, Value: v },
action.Get { Key: k },
})
resp, err := c.BuildAndExecQuery(p)
⬜ TLS ✅ DDL (Keyspaces/Tables) ✅ Auto-Reconnection
✅ Implemented | ⬜ NotImplemented | 🟪 WaitingForSkyhash | ||
---|---|---|---|---|
--- | --- | --- | --- | --- |
✅ ResponseCode | ✅ Integer | ✅ SignedInteger | ✅ String | ✅ BinaryString |
✅ Float | ⬜ SmallInteger | ⬜ SignedSmallInteger | 🟪 Json | |
⬜ Array | ✅ FlatArray | ✅ AnyArray | ✅ TypedArray | ✅ TypedNonNullArray |
✅ Implemented | ⬜ NotImplemented | 🟪 Partial | ||
---|---|---|---|---|
--- | --- | --- | --- | --- |
✅ GET | ✅ SET | ✅ UPDATE | ✅ MGET | ✅ MSET |
✅ DEL | ✅ EXISTS | ✅ HEYA | ✅ USET | ✅ POP |
✅ MPOP | ✅ MUPDATE | ✅ SDEL | ✅ SSET | ✅ SUPDATE |
✅ LMOD | ✅ LGET | ✅ LSET | ✅ LSKEYS | |
✅ DBSIZE | ✅ FLUSHDB | ✅ KEYLEN | ✅ WHEREAMI | ✅ MKSNAP |
✅ SYS | ✅ AUTH |
The subpackage provides opinionated extensions that could be useful or convenient.
For example, *ConnX.GetWithSimTTL()
, *ConnX.SetWithSimTTL()
, *ConnX.UpdateWithSimTTL()
are alternative versions of their respective methods of Conn, these methods only works with []byte values and automatically add an action to maintain timestamp with key "key_timestamp".
Connection Pools manage multiple connections on its own and users have no way to decide which Conn
is used on method calls.
If you are working with multiple Keyspaces/Tables and you are using Connection Pool, there are 2 suggested usages:
USE
it. Running USE
is equal to run USE
on all of the existing connections in it, and change the default container of the pool so future connections will automatically USE
that.Testcases are written for local Skytable instances (@127.0.0.1), some of them use auth coonnections, some don't.
The Auth-Enabled one should be bound to 2003 (Skytable default port), while the Auth-Disabled one should be bound to 2004 (as specified in skytable_test.go
).
All auth testcases use username go-skytable-test
(as specified in skytable_test.go
), and looks up the token by:
GO_SKYTABLE_TEST_TOKEN
as the token.go-skytable-test
and read the content as the token.If the go-skytable-test
user and the token are setup correctly, the auth testcases should run without issues.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.