package api

import (
  "fmt"

  "github.com/ory/kratos-client-go"
)

func NewKratosClient(endpoint string) *kratos.APIClient {
  conf := kratos.NewConfiguration()
  conf.Servers = kratos.ServerConfigurations{{URL: endpoint}}
  return kratos.NewAPIClient(conf)
}

func main() {
  c := NewKratosClient("http://127.0.0.1:4433/")

  flow, _, err := c.PublicApi.InitializeSelfServiceVerificationViaAPIFlow(context.Background()).Execute()
  if err != nil {
    // ...
  }

  fmt.Printf("%+v", flow)
}
