Skip to content

kastela-sdp/kastela-sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kastela SDK for Go

Go Reference

Installation

go get github.com/kastela-sdp/kastela-sdk-go

Usage

package main

import (
  "fmt"
  "log"

  "github.com/kastela-sdp/kastela-sdk-go"
)

func main() {
  client := kastela.NewClient("https://127.0.0.1:3100", "./ca.crt", "./client.crt", "./client.key")
  
  data, err := client.ProtectionOpen([]*kastela.ProtectionOpenInput{
    {
      ProtectionID: "your-protection-id",
      Tokens: []any{"foo", "bar", "baz"},
    },
  })
  if err != nil {
    log.Fatalln(err)
  }
  
  fmt.Println(data)
}

Reference