Skip to content

raito-io/sdk-go

Repository files navigation

Raito SDK

Software License


Raito SDK

Note: This repository is still in an early stage of development. At this point, no contributions are accepted to the project yet.

This repository contains a simple SDK for Raito Cloud. It can be used to automate basic operations.

Installation

go get -u github.com/raito-io/sdk-go

Examples

package main

import (
    "context"
    "fmt"

    raito "github.com/raito-io/sdk-go"
)

func main() {
	ctx := context.Background()
	
	// Create a new RaitoClient 
	client := raito.NewClient(ctx, "your-domain", "your-user", "your-secret")
	
	// Access the AccessProviderClient 
	accessProviderClient := client.AccessProvider()
	ap, err := accessProviderClient.GetAccessProvider(ctx, "ap-id")
	if err != nil {
	    panic("ap does not exist: " + err.Error())
	}
	
	fmt.Printf("AccessProvider: %+v\n", ap)
}