MIT License

项目介绍

1Password/connect-sdk-go 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 MIT License 许可证,目前获得 191 个 Star、29 次 Fork。

仓库全名
1Password/connect-sdk-go
开源许可证
MIT License
Star 数
191
Fork 数
29
未关闭 Issue
13

README 摘要

1Password Connect SDK for Go Access your 1Password items in your Go applications through your self-hosted 1Password Connect server . The 1Password Connect Go SDK provides access to the 1Password Connect API, to facilitate communication with the Connect server hosted on your infrastructure and 1Password. The library is intended to be used by your applications, pipelines, and other automations to simplify accessing…

完整内容见 GitHub 原始 README 或本页 。

常见问题

connect-sdk-go 用什么语言开发?

主要使用 Go 编写,采用 MIT License 许可证,目前有 191 个 Star。

connect-sdk-go 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 connect-sdk-go 的源码?

可以直接克隆仓库:git clone https://github.com/1Password/connect-sdk-go.git,默认分支为 main;安装与运行步骤见仓库 README。

connect-sdk-go 最近还在维护吗?

仓库最近一次更新为 4 天前,当前有 13 个未关闭 Issue;Star 数为 191,可作为社区活跃度的参考。

简要分析

热度分
262
价值分
123
活跃状态
活跃

语言占比

Go
Makefile
Shell

Release

README

1Password Connect SDK for Go

Access your 1Password items in your Go applications through your self-hosted 1Password Connect server.

Get started

The 1Password Connect Go SDK provides access to the 1Password Connect API, to facilitate communication with the Connect server hosted on your infrastructure and 1Password. The library is intended to be used by your applications, pipelines, and other automations to simplify accessing items stored in your 1Password vaults.

This project is licensed under MIT. Use of the 1Password APIs and services accessed through these tools is governed by the 1Password API Terms of Service.

✨ Quickstart

  1. Download and install the 1Password Connect Go SDK:

    go get github.com/1Password/connect-sdk-go
    
  2. Export the OP_CONNECT_HOST and OP_CONNECT_TOKEN environment variables:

    export OP_CONNECT_HOST=<your-connect-host> && \
        export OP_CONNECT_TOKEN=<your-connect-token>
    
  3. Use it in your code

    • Read a secret:

      import "github.com/1Password/connect-sdk-go/connect"
      
      func main () {
          client := connect.NewClientFromEnvironment()
          item, err := client.GetItem("<item-uuid>", "<vault-uuid>")
          if err != nil {
              log.Fatal(err)
          }
      }
      
    • Write a secret:

      import (
          "github.com/1Password/connect-sdk-go/connect"
          "github.com/1Password/connect-sdk-go/onepassword"
      )
      
      func main () {
          client := connect.NewClientFromEnvironment()
          item := &onepassword.Item{
              Title:    "Secret String",
              Category: onepassword.Login,
              Fields: []*onepassword.ItemField{{
                  Value: "mysecret",
                  Type:  "STRING",
              }},
          }
      
          postedItem, err := client.CreateItem(item, "<vault-uuid>")
          if err != nil {
              log.Fatal(err)
          }
      }
      

For more examples, check out USAGE.md.

💙 Community & Support

🔐 Security

1Password requests you practice responsible disclosure if you discover a vulnerability.

Please file requests by sending an email to [email protected].

评论

暂无评论