saasusstainless

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

README

Saasus Platform Go API Library

Go Reference

The Saasus Platform Go library provides convenient access to the Saasus Platform REST API from applications written in Go.

It is generated with Stainless.

Installation

import (
	"github.com/Anti-Pattern-Inc/saasus-stainless-go" // imported as saasusstainless
)

Or to pin the version:

go get -u 'github.com/Anti-Pattern-Inc/saasus-stainless-go@v0.1.0'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/Anti-Pattern-Inc/saasus-stainless-go"
	"github.com/Anti-Pattern-Inc/saasus-stainless-go/option"
)

func main() {
	client := saasusstainless.NewClient(
		option.WithAPIKey("My API Key"),       // defaults to os.LookupEnv("SAASUS_API_KEY")
		option.WithSecretKey("My Secret Key"), // defaults to os.LookupEnv("SAASUS_SECRET_KEY")
		option.WithSaasID("My Saas ID"),       // defaults to os.LookupEnv("SAASUS_SAAS_ID")
	)
	userinfo, err := client.Userinfo.Get(context.TODO(), saasusstainless.UserinfoGetParams{
		Token: "REPLACE_ME",
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", userinfo.ID)
}

SaaSus 認証ヘルパー

lib パッケージはSaaSusの認証を簡単に設定するためのヘルパーを提供します。 クライアント設定(WithSaaSusAuth)、認証ミドルウェア(AuthMiddleware)、 Echo フレームワーク連携の詳細は lib/README.md を参照してください。

import (
    saasusstainless "github.com/stainless-sdks/saasus-stainless-go"
    "github.com/stainless-sdks/saasus-stainless-go/lib"
)

// 環境変数 SAASUS_API_KEY / SAASUS_SECRET_KEY / SAASUS_SAAS_ID から認証情報を読み取る
client := saasusstainless.NewClient(lib.WithSaaSusAuth()...)

// Echo での認証ミドルウェア
// e.Use(echo.WrapMiddleware(lib.AuthMiddleware(&client)))
Request fields

The saasusstainless library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `json:"...,required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, saasusstainless.String(string), saasusstainless.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := saasusstainless.ExampleParams{
	ID:   "id_xxx",                      // required property
	Name: saasusstainless.String("..."), // optional property

	Point: saasusstainless.Point{
		X: 0,                      // required field will serialize as 0
		Y: saasusstainless.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: saasusstainless.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[saasusstainless.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := saasusstainless.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Userinfo.Get(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *saasusstainless.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Userinfo.Get(context.TODO(), saasusstainless.UserinfoGetParams{
	Token: "REPLACE_ME",
})
if err != nil {
	var apierr *saasusstainless.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/userinfo": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Userinfo.Get(
	ctx,
	saasusstainless.UserinfoGetParams{
		Token: "REPLACE_ME",
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper saasusstainless.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := saasusstainless.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Userinfo.Get(
	context.TODO(),
	saasusstainless.UserinfoGetParams{
		Token: "REPLACE_ME",
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
userinfo, err := client.Userinfo.Get(
	context.TODO(),
	saasusstainless.UserinfoGetParams{
		Token: "REPLACE_ME",
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", userinfo)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: saasusstainless.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := saasusstainless.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (SAASUS_API_KEY, SAASUS_SECRET_KEY, SAASUS_SAAS_ID, SAASUS_PLATFORM_BASE_URL). This should be used to initialize new clients.

func File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type AccountVerification

type AccountVerification struct {
	// email: E メール(e-mail) sms: SMS smsOrEmail: SMS 不可の場合に E メール(email if
	// SMS is not possible)
	//
	// Any of "email", "sms", "smsOrEmail".
	SendingTo AccountVerificationSendingTo `json:"sending_to" api:"required"`
	// code: 検証コード(verification code) link: 検証リンク(verification link) ※ 未提供
	// の機能のため、変更・保存はできません(This function is not yet provided, so it
	// cannot be changed or saved.)
	//
	// Any of "code", "link".
	VerificationMethod AccountVerificationVerificationMethod `json:"verification_method" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SendingTo          respjson.Field
		VerificationMethod respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

アカウント認証設定(account authentication settings) ※ 未提供の機能のため、変更・ 保存はできません(This function is not yet provided, so it cannot be changed or saved.)

func (AccountVerification) RawJSON

func (r AccountVerification) RawJSON() string

Returns the unmodified JSON received from the API

func (AccountVerification) ToParam

ToParam converts this AccountVerification to a AccountVerificationParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AccountVerificationParam.Overrides()

func (*AccountVerification) UnmarshalJSON

func (r *AccountVerification) UnmarshalJSON(data []byte) error

type AccountVerificationParam

type AccountVerificationParam struct {
	// email: E メール(e-mail) sms: SMS smsOrEmail: SMS 不可の場合に E メール(email if
	// SMS is not possible)
	//
	// Any of "email", "sms", "smsOrEmail".
	SendingTo AccountVerificationSendingTo `json:"sending_to,omitzero" api:"required"`
	// code: 検証コード(verification code) link: 検証リンク(verification link) ※ 未提供
	// の機能のため、変更・保存はできません(This function is not yet provided, so it
	// cannot be changed or saved.)
	//
	// Any of "code", "link".
	VerificationMethod AccountVerificationVerificationMethod `json:"verification_method,omitzero" api:"required"`
	// contains filtered or unexported fields
}

アカウント認証設定(account authentication settings) ※ 未提供の機能のため、変更・ 保存はできません(This function is not yet provided, so it cannot be changed or saved.)

The properties SendingTo, VerificationMethod are required.

func (AccountVerificationParam) MarshalJSON

func (r AccountVerificationParam) MarshalJSON() (data []byte, err error)

func (*AccountVerificationParam) UnmarshalJSON

func (r *AccountVerificationParam) UnmarshalJSON(data []byte) error

type AccountVerificationSendingTo

type AccountVerificationSendingTo string

email: E メール(e-mail) sms: SMS smsOrEmail: SMS 不可の場合に E メール(email if SMS is not possible)

const (
	AccountVerificationSendingToEmail      AccountVerificationSendingTo = "email"
	AccountVerificationSendingToSMS        AccountVerificationSendingTo = "sms"
	AccountVerificationSendingToSMSOrEmail AccountVerificationSendingTo = "smsOrEmail"
)

type AccountVerificationVerificationMethod

type AccountVerificationVerificationMethod string

code: 検証コード(verification code) link: 検証リンク(verification link) ※ 未提供 の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.)

const (
	AccountVerificationVerificationMethodCode AccountVerificationVerificationMethod = "code"
	AccountVerificationVerificationMethodLink AccountVerificationVerificationMethod = "link"
)

type ApikeyListResponse

type ApikeyListResponse struct {
	// API キー(API Key)
	APIKeys []string `json:"api_keys" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		APIKeys     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ApikeyListResponse) RawJSON

func (r ApikeyListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ApikeyListResponse) UnmarshalJSON

func (r *ApikeyListResponse) UnmarshalJSON(data []byte) error

type ApikeyService

type ApikeyService struct {
	Options []option.RequestOption
}

SaaSus テナント(SaaSus Tenant)

ApikeyService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApikeyService method instead.

func NewApikeyService

func NewApikeyService(opts ...option.RequestOption) (r ApikeyService)

NewApikeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ApikeyService) Delete

func (r *ApikeyService) Delete(ctx context.Context, apiKey string, opts ...option.RequestOption) (err error)

サーバサイド用の API キーを削除します。

Delete API Key.

func (*ApikeyService) List

func (r *ApikeyService) List(ctx context.Context, opts ...option.RequestOption) (res *ApikeyListResponse, err error)

サーバサイド用に API キーを取得します。最大 2 つまで発行できます。

Get API key for the server side. Up to 2 can be generated.

func (*ApikeyService) New

func (r *ApikeyService) New(ctx context.Context, opts ...option.RequestOption) (err error)

サーバサイド用に API キーを発行します。最大 2 つまで発行できます。

Generate an API key for the server side. Up to 2 can be generated.

type Attribute

type Attribute struct {
	// 属性名(attribute name)
	AttributeName string `json:"attribute_name" api:"required"`
	// 型(date は YYYY-MM-DD の形式で使用する事ができます。) (Type (date can be set
	// to YYYY-MM-DD format.))
	//
	// Any of "string", "number", "bool", "date".
	AttributeType AttributeAttributeType `json:"attribute_type" api:"required"`
	// 表示名(display name)
	DisplayName string `json:"display_name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AttributeName respjson.Field
		AttributeType respjson.Field
		DisplayName   respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Attribute) RawJSON

func (r Attribute) RawJSON() string

Returns the unmodified JSON received from the API

func (Attribute) ToParam

func (r Attribute) ToParam() AttributeParam

ToParam converts this Attribute to a AttributeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AttributeParam.Overrides()

func (*Attribute) UnmarshalJSON

func (r *Attribute) UnmarshalJSON(data []byte) error

type AttributeAttributeType

type AttributeAttributeType string

型(date は YYYY-MM-DD の形式で使用する事ができます。) (Type (date can be set to YYYY-MM-DD format.))

const (
	AttributeAttributeTypeString AttributeAttributeType = "string"
	AttributeAttributeTypeNumber AttributeAttributeType = "number"
	AttributeAttributeTypeBool   AttributeAttributeType = "bool"
	AttributeAttributeTypeDate   AttributeAttributeType = "date"
)

type AttributeParam

type AttributeParam struct {
	// 属性名(attribute name)
	AttributeName string `json:"attribute_name" api:"required"`
	// 型(date は YYYY-MM-DD の形式で使用する事ができます。) (Type (date can be set
	// to YYYY-MM-DD format.))
	//
	// Any of "string", "number", "bool", "date".
	AttributeType AttributeAttributeType `json:"attribute_type,omitzero" api:"required"`
	// 表示名(display name)
	DisplayName string `json:"display_name" api:"required"`
	// contains filtered or unexported fields
}

The properties AttributeName, AttributeType, DisplayName are required.

func (AttributeParam) MarshalJSON

func (r AttributeParam) MarshalJSON() (data []byte, err error)

func (*AttributeParam) UnmarshalJSON

func (r *AttributeParam) UnmarshalJSON(data []byte) error

type AuthInfo

type AuthInfo struct {
	// 認証後遷移先(Redirect After Authentication)
	CallbackURL string `json:"callback_url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CallbackURL respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AuthInfo) RawJSON

func (r AuthInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (AuthInfo) ToParam

func (r AuthInfo) ToParam() AuthInfoParam

ToParam converts this AuthInfo to a AuthInfoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AuthInfoParam.Overrides()

func (*AuthInfo) UnmarshalJSON

func (r *AuthInfo) UnmarshalJSON(data []byte) error

type AuthInfoParam

type AuthInfoParam struct {
	// 認証後遷移先(Redirect After Authentication)
	CallbackURL string `json:"callback_url" api:"required"`
	// contains filtered or unexported fields
}

The property CallbackURL is required.

func (AuthInfoParam) MarshalJSON

func (r AuthInfoParam) MarshalJSON() (data []byte, err error)

func (*AuthInfoParam) UnmarshalJSON

func (r *AuthInfoParam) UnmarshalJSON(data []byte) error

type AuthInfoService

type AuthInfoService struct {
	Options []option.RequestOption
}

認証情報(Auth Info)

AuthInfoService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthInfoService method instead.

func NewAuthInfoService

func NewAuthInfoService(opts ...option.RequestOption) (r AuthInfoService)

NewAuthInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AuthInfoService) Get

func (r *AuthInfoService) Get(ctx context.Context, opts ...option.RequestOption) (res *AuthInfo, err error)

ログイン後に認証情報を渡す SaaS の URL を取得します。ここで取得した URL へ認証情 報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。

Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK.

func (*AuthInfoService) Update

func (r *AuthInfoService) Update(ctx context.Context, body AuthInfoUpdateParams, opts ...option.RequestOption) (err error)

ログイン後に認証情報を渡す SaaS の URL を登録します。ここで登録した URL に認証情 報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。

Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK.

type AuthInfoUpdateParams

type AuthInfoUpdateParams struct {
	AuthInfo AuthInfoParam
	// contains filtered or unexported fields
}

func (AuthInfoUpdateParams) MarshalJSON

func (r AuthInfoUpdateParams) MarshalJSON() (data []byte, err error)

func (*AuthInfoUpdateParams) UnmarshalJSON

func (r *AuthInfoUpdateParams) UnmarshalJSON(data []byte) error

type BasicInfoGetResponse

type BasicInfoGetResponse struct {
	// 代替ドメイン名(Certificate Domain Name)
	CertificateDNSRecord DNSRecord `json:"certificate_dns_record" api:"required"`
	// Cloud Front DNS レコード(CloudFront DNS Records)
	CloudFrontDNSRecord DNSRecord `json:"cloud_front_dns_record" api:"required"`
	// デフォルトドメイン名(Default Domain Name)
	DefaultDomainName string `json:"default_domain_name" api:"required"`
	// DKIM DNS レコード(DKIM DNS Records)
	DkimDNSRecords []DNSRecord `json:"dkim_dns_records" api:"required"`
	// ドメイン名(Domain Name)
	DomainName string `json:"domain_name" api:"required"`
	// 認証メールの送信元メールアドレス(Sender Email for Authentication Email)
	FromEmailAddress string `json:"from_email_address" api:"required"`
	// DNS レコードの検証結果(DNS Record Verification Results)
	IsDNSValidated bool `json:"is_dns_validated" api:"required"`
	// 認証メールの返信元メールアドレス(Reply-from email address of authentication
	// email)
	ReplyEmailAddress string `json:"reply_email_address" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CertificateDNSRecord respjson.Field
		CloudFrontDNSRecord  respjson.Field
		DefaultDomainName    respjson.Field
		DkimDNSRecords       respjson.Field
		DomainName           respjson.Field
		FromEmailAddress     respjson.Field
		IsDNSValidated       respjson.Field
		ReplyEmailAddress    respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BasicInfoGetResponse) RawJSON

func (r BasicInfoGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BasicInfoGetResponse) UnmarshalJSON

func (r *BasicInfoGetResponse) UnmarshalJSON(data []byte) error

type BasicInfoService

type BasicInfoService struct {
	Options []option.RequestOption
}

基本情報(Basic Info)

BasicInfoService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBasicInfoService method instead.

func NewBasicInfoService

func NewBasicInfoService(opts ...option.RequestOption) (r BasicInfoService)

NewBasicInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BasicInfoService) Get

SaaS ID を元に設定されているドメイン名と CNAME レコードを取得します。取得した CNAME レコードを DNS に設定することで、ログイン画面を生成します。

Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated.

func (*BasicInfoService) Update

func (r *BasicInfoService) Update(ctx context.Context, body BasicInfoUpdateParams, opts ...option.RequestOption) (err error)

SaaS ID を元にパラメータとして設定したドメイン名を設定更新します。 CNAME レコー ドが生成されますので、 DNS に設定して下さい。既に稼働中の SaaS アプリケーション に設定している場合には、動作に影響があります。

Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior.

type BasicInfoUpdateParams

type BasicInfoUpdateParams struct {
	// ドメイン名(Domain Name)
	DomainName string `json:"domain_name" api:"required"`
	// 認証メールの送信元メールアドレス(Sender email of authentication email)
	FromEmailAddress string `json:"from_email_address" api:"required"`
	// 認証メールの返信元メールアドレス(Reply-from email address of authentication
	// email)
	ReplyEmailAddress param.Opt[string] `json:"reply_email_address,omitzero"`
	// contains filtered or unexported fields
}

func (BasicInfoUpdateParams) MarshalJSON

func (r BasicInfoUpdateParams) MarshalJSON() (data []byte, err error)

func (*BasicInfoUpdateParams) UnmarshalJSON

func (r *BasicInfoUpdateParams) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	Options  []option.RequestOption
	Userinfo UserinfoService
	// 基本情報(Basic Info)
	BasicInfo BasicInfoService
	// 認証情報(Auth Info)
	AuthInfo AuthInfoService
	// SaaS 単位のユーザー(SaaS User)
	Users UserService
	// テナント(Tenant)
	Tenants TenantService
	// 役割(ロール)(Role)
	Roles RoleService
	// ユーザーの追加属性(Additional User Attributes)
	UserAttributes UserAttributeService
	// テナントの追加属性(Additional Tenant Attributes)
	TenantAttributes TenantAttributeService
	// SaaSus テナント(SaaSus Tenant)
	Apikeys ApikeyService
	// SaaSus テナント(SaaSus Tenant)
	Saasid SaasidService
	// 基本情報(Basic Info)
	NotificationMessages NotificationMessageService
	// 認証情報(Auth Info)
	IdentityProviders IdentityProviderService
	// 認証情報(Auth Info)
	SignInSettings SignInSettingService
	// 基本情報(Basic Info)
	CustomizePages CustomizePageService
	// 基本情報(Basic Info)
	CustomizePageSettings CustomizePageSettingService
	// 環境情報(Environment Info)
	Envs EnvService
	// テナント(Tenant)
	Stripe StripeService
	// SaaSus テナント(SaaSus Tenant)
	ClientSecret ClientSecretService
	// 認証・認可情報(Authentication/Authorization Info)
	Credentials CredentialService
}

Client creates a struct with services and top level methods that help with interacting with the Saasus Platform API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r Client)

NewClient generates a new client with the default option read from the environment (SAASUS_API_KEY, SAASUS_SECRET_KEY, SAASUS_SAAS_ID, SAASUS_PLATFORM_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type ClientSecretGetResponse

type ClientSecretGetResponse struct {
	// クライアントシークレット(client secret)
	ClientSecret string `json:"client_secret" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClientSecret respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ClientSecretGetResponse) RawJSON

func (r ClientSecretGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ClientSecretGetResponse) UnmarshalJSON

func (r *ClientSecretGetResponse) UnmarshalJSON(data []byte) error

type ClientSecretService

type ClientSecretService struct {
	Options []option.RequestOption
}

SaaSus テナント(SaaSus Tenant)

ClientSecretService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClientSecretService method instead.

func NewClientSecretService

func NewClientSecretService(opts ...option.RequestOption) (r ClientSecretService)

NewClientSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ClientSecretService) Get

API リクエストでアプリが使用する固定文字列を取得します。

Gets the fixed string that the app uses in API requests.

func (*ClientSecretService) Update

func (r *ClientSecretService) Update(ctx context.Context, opts ...option.RequestOption) (err error)

API リクエストでアプリが使用する固定文字列を再発行します。既に稼働中の SaaS アプ リケーションに設定している場合には、動作に影響があります。

Reissue fixed strings that apps use in API requests. If changed on a SaaS application that is already running, it will affect the behavior.

type CredentialGetParams

type CredentialGetParams struct {
	// 一時コード(Temp Code)
	Code param.Opt[string] `query:"code,omitzero" json:"-"`
	// リフレッシュトークン(Refresh Token)
	RefreshToken param.Opt[string] `query:"refresh-token,omitzero" json:"-"`
	// 認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取
	// 得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得指定されていな
	// い場合は tempCodeAuth になります
	//
	// Any of "tempCodeAuth", "refreshTokenAuth".
	AuthFlow CredentialGetParamsAuthFlow `query:"auth-flow,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CredentialGetParams) URLQuery

func (r CredentialGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CredentialGetParams's query parameters as `url.Values`.

type CredentialGetParamsAuthFlow

type CredentialGetParamsAuthFlow string

認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取 得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得指定されていな い場合は tempCodeAuth になります

const (
	CredentialGetParamsAuthFlowTempCodeAuth     CredentialGetParamsAuthFlow = "tempCodeAuth"
	CredentialGetParamsAuthFlowRefreshTokenAuth CredentialGetParamsAuthFlow = "refreshTokenAuth"
)

type CredentialNewParams

type CredentialNewParams struct {
	Credentials CredentialsParam
	// contains filtered or unexported fields
}

func (CredentialNewParams) MarshalJSON

func (r CredentialNewParams) MarshalJSON() (data []byte, err error)

func (*CredentialNewParams) UnmarshalJSON

func (r *CredentialNewParams) UnmarshalJSON(data []byte) error

type CredentialNewResponse

type CredentialNewResponse struct {
	// 一時コード(temp code)
	Code string `json:"code" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CredentialNewResponse) RawJSON

func (r CredentialNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CredentialNewResponse) UnmarshalJSON

func (r *CredentialNewResponse) UnmarshalJSON(data []byte) error

type CredentialService

type CredentialService struct {
	Options []option.RequestOption
}

認証・認可情報(Authentication/Authorization Info)

CredentialService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCredentialService method instead.

func NewCredentialService

func NewCredentialService(opts ...option.RequestOption) (r CredentialService)

NewCredentialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CredentialService) Get

一時コードまたはリフレッシュトークンを利用して ID トークン・アクセストークン・リ フレッシュトークンを取得する。

Get ID token, access token, and refresh token using a temporary code or a refresh token.

func (*CredentialService) New

引数の ID トークン・アクセストークン・リフレッシュトークンを一時保存し取得用の一 時コードを返却する。一時コードの有効期間は発行から 10 秒です。

Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance.

type Credentials

type Credentials struct {
	// アクセストークン(access token)
	AccessToken string `json:"access_token" api:"required"`
	// ID トークン(ID token)
	IDToken string `json:"id_token" api:"required"`
	// リフレッシュトークン(refresh token)
	RefreshToken string `json:"refresh_token"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccessToken  respjson.Field
		IDToken      respjson.Field
		RefreshToken respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Credentials) RawJSON

func (r Credentials) RawJSON() string

Returns the unmodified JSON received from the API

func (Credentials) ToParam

func (r Credentials) ToParam() CredentialsParam

ToParam converts this Credentials to a CredentialsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with CredentialsParam.Overrides()

func (*Credentials) UnmarshalJSON

func (r *Credentials) UnmarshalJSON(data []byte) error

type CredentialsParam

type CredentialsParam struct {
	// アクセストークン(access token)
	AccessToken string `json:"access_token" api:"required"`
	// ID トークン(ID token)
	IDToken string `json:"id_token" api:"required"`
	// リフレッシュトークン(refresh token)
	RefreshToken param.Opt[string] `json:"refresh_token,omitzero"`
	// contains filtered or unexported fields
}

The properties AccessToken, IDToken are required.

func (CredentialsParam) MarshalJSON

func (r CredentialsParam) MarshalJSON() (data []byte, err error)

func (*CredentialsParam) UnmarshalJSON

func (r *CredentialsParam) UnmarshalJSON(data []byte) error

type CustomizePageGetResponse

type CustomizePageGetResponse struct {
	// パスワードリセット画面(password reset page)
	PasswordResetPage CustomizePageProps `json:"password_reset_page" api:"required"`
	// ログイン画面(login page)
	SignInPage CustomizePageProps `json:"sign_in_page" api:"required"`
	// 新規登録画面(new registration page)
	SignUpPage CustomizePageProps `json:"sign_up_page" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PasswordResetPage respjson.Field
		SignInPage        respjson.Field
		SignUpPage        respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CustomizePageGetResponse) RawJSON

func (r CustomizePageGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CustomizePageGetResponse) UnmarshalJSON

func (r *CustomizePageGetResponse) UnmarshalJSON(data []byte) error

type CustomizePageProps

type CustomizePageProps struct {
	// 画面の HTML を編集できます ※ 未提供の機能のため、変更・保存はできません
	//
	// Edit page HTML ※ This function is not yet provided, so it cannot be changed or
	// saved.
	HTMLContents string `json:"html_contents" api:"required"`
	// プライバシーポリシーチェックボックスを表示するが設定されているか(show the
	// privacy policy checkbox)
	IsPrivacyPolicy bool `json:"is_privacy_policy" api:"required"`
	// 利用規約の同意チェックボックスを表示するが設定されているか(display the terms of
	// use agreement check box)
	IsTermsOfService bool `json:"is_terms_of_service" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HTMLContents     respjson.Field
		IsPrivacyPolicy  respjson.Field
		IsTermsOfService respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CustomizePageProps) RawJSON

func (r CustomizePageProps) RawJSON() string

Returns the unmodified JSON received from the API

func (CustomizePageProps) ToParam

ToParam converts this CustomizePageProps to a CustomizePagePropsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with CustomizePagePropsParam.Overrides()

func (*CustomizePageProps) UnmarshalJSON

func (r *CustomizePageProps) UnmarshalJSON(data []byte) error

type CustomizePagePropsParam

type CustomizePagePropsParam struct {
	// 画面の HTML を編集できます ※ 未提供の機能のため、変更・保存はできません
	//
	// Edit page HTML ※ This function is not yet provided, so it cannot be changed or
	// saved.
	HTMLContents string `json:"html_contents" api:"required"`
	// プライバシーポリシーチェックボックスを表示するが設定されているか(show the
	// privacy policy checkbox)
	IsPrivacyPolicy bool `json:"is_privacy_policy" api:"required"`
	// 利用規約の同意チェックボックスを表示するが設定されているか(display the terms of
	// use agreement check box)
	IsTermsOfService bool `json:"is_terms_of_service" api:"required"`
	// contains filtered or unexported fields
}

The properties HTMLContents, IsPrivacyPolicy, IsTermsOfService are required.

func (CustomizePagePropsParam) MarshalJSON

func (r CustomizePagePropsParam) MarshalJSON() (data []byte, err error)

func (*CustomizePagePropsParam) UnmarshalJSON

func (r *CustomizePagePropsParam) UnmarshalJSON(data []byte) error

type CustomizePageService

type CustomizePageService struct {
	Options []option.RequestOption
}

基本情報(Basic Info)

CustomizePageService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomizePageService method instead.

func NewCustomizePageService

func NewCustomizePageService(opts ...option.RequestOption) (r CustomizePageService)

NewCustomizePageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomizePageService) Get

認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を取得します。

Get the authentication screen setting information (new registration, login, password reset, etc.).

func (*CustomizePageService) Update

認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を更新します。

Update the authentication page setting information (new registration, login, password reset, etc.).

type CustomizePageSettingGetResponse

type CustomizePageSettingGetResponse struct {
	// ファビコン(favicon)
	Favicon string `json:"favicon" api:"required"`
	// サービスアイコン(service icon)
	Icon string `json:"icon" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Favicon     respjson.Field
		Icon        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	CustomizePageSettingsProps
}

func (CustomizePageSettingGetResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CustomizePageSettingGetResponse) UnmarshalJSON

func (r *CustomizePageSettingGetResponse) UnmarshalJSON(data []byte) error

type CustomizePageSettingService

type CustomizePageSettingService struct {
	Options []option.RequestOption
}

基本情報(Basic Info)

CustomizePageSettingService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomizePageSettingService method instead.

func NewCustomizePageSettingService

func NewCustomizePageSettingService(opts ...option.RequestOption) (r CustomizePageSettingService)

NewCustomizePageSettingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomizePageSettingService) Get

認証認可基本情報を取得します。

Get authentication authorization basic information.

func (*CustomizePageSettingService) Update

認証認可基本情報を更新します。

Update authentication authorization basic information.

type CustomizePageSettingUpdateParams

type CustomizePageSettingUpdateParams struct {
	// ファビコン(favicon)
	Favicon string `json:"favicon" api:"required" format:"base64"`
	// Google Tag Manager コンテナ ID(Google Tag Manager container ID)
	GoogleTagManagerContainerID string `json:"google_tag_manager_container_id" api:"required"`
	// サービスアイコン(service icon)
	Icon string `json:"icon" api:"required" format:"base64"`
	// プライバシーポリシー URL(privacy policy URL)
	PrivacyPolicyURL string `json:"privacy_policy_url" api:"required"`
	// 利用規約 URL(terms of service URL)
	TermsOfServiceURL string `json:"terms_of_service_url" api:"required"`
	// サービス名(service name)
	Title string `json:"title" api:"required"`
	// contains filtered or unexported fields
}

func (CustomizePageSettingUpdateParams) MarshalJSON

func (r CustomizePageSettingUpdateParams) MarshalJSON() (data []byte, err error)

func (*CustomizePageSettingUpdateParams) UnmarshalJSON

func (r *CustomizePageSettingUpdateParams) UnmarshalJSON(data []byte) error

type CustomizePageSettingsProps

type CustomizePageSettingsProps struct {
	// Google Tag Manager コンテナ ID(Google Tag Manager container ID)
	GoogleTagManagerContainerID string `json:"google_tag_manager_container_id" api:"required"`
	// プライバシーポリシー URL(privacy policy URL)
	PrivacyPolicyURL string `json:"privacy_policy_url" api:"required"`
	// 利用規約 URL(terms of service URL)
	TermsOfServiceURL string `json:"terms_of_service_url" api:"required"`
	// サービス名(service name)
	Title string `json:"title" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		GoogleTagManagerContainerID respjson.Field
		PrivacyPolicyURL            respjson.Field
		TermsOfServiceURL           respjson.Field
		Title                       respjson.Field
		ExtraFields                 map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CustomizePageSettingsProps) RawJSON

func (r CustomizePageSettingsProps) RawJSON() string

Returns the unmodified JSON received from the API

func (*CustomizePageSettingsProps) UnmarshalJSON

func (r *CustomizePageSettingsProps) UnmarshalJSON(data []byte) error

type CustomizePageUpdateParams

type CustomizePageUpdateParams struct {
	// パスワードリセット画面(password reset page)
	PasswordResetPage CustomizePagePropsParam `json:"password_reset_page,omitzero"`
	// ログイン画面(login page)
	SignInPage CustomizePagePropsParam `json:"sign_in_page,omitzero"`
	// 新規登録画面(new registration page)
	SignUpPage CustomizePagePropsParam `json:"sign_up_page,omitzero"`
	// contains filtered or unexported fields
}

func (CustomizePageUpdateParams) MarshalJSON

func (r CustomizePageUpdateParams) MarshalJSON() (data []byte, err error)

func (*CustomizePageUpdateParams) UnmarshalJSON

func (r *CustomizePageUpdateParams) UnmarshalJSON(data []byte) error

type DNSRecord

type DNSRecord struct {
	// レコード名(Record Name)
	Name string `json:"name" api:"required"`
	// CNAME リソースレコード(CNAME Resource Record)
	//
	// Any of "CNAME".
	Type DNSRecordType `json:"type" api:"required"`
	// 値(Value)
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Type        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DNSRecord) RawJSON

func (r DNSRecord) RawJSON() string

Returns the unmodified JSON received from the API

func (*DNSRecord) UnmarshalJSON

func (r *DNSRecord) UnmarshalJSON(data []byte) error

type DNSRecordType

type DNSRecordType string

CNAME リソースレコード(CNAME Resource Record)

const (
	DNSRecordTypeCname DNSRecordType = "CNAME"
)

type DeviceConfiguration

type DeviceConfiguration struct {
	// always: 常に記憶する(always remember) userOptIn: ユーザーオプトイン(user opt-in)
	// no: (don't save)
	//
	// Any of "always", "userOptIn", "no".
	DeviceRemembering DeviceConfigurationDeviceRemembering `json:"device_remembering" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DeviceRemembering respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

信頼済みデバイスの記憶の設定(settings for remembering trusted devices)

func (DeviceConfiguration) RawJSON

func (r DeviceConfiguration) RawJSON() string

Returns the unmodified JSON received from the API

func (DeviceConfiguration) ToParam

ToParam converts this DeviceConfiguration to a DeviceConfigurationParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with DeviceConfigurationParam.Overrides()

func (*DeviceConfiguration) UnmarshalJSON

func (r *DeviceConfiguration) UnmarshalJSON(data []byte) error

type DeviceConfigurationDeviceRemembering

type DeviceConfigurationDeviceRemembering string

always: 常に記憶する(always remember) userOptIn: ユーザーオプトイン(user opt-in) no: (don't save)

const (
	DeviceConfigurationDeviceRememberingAlways    DeviceConfigurationDeviceRemembering = "always"
	DeviceConfigurationDeviceRememberingUserOptIn DeviceConfigurationDeviceRemembering = "userOptIn"
	DeviceConfigurationDeviceRememberingNo        DeviceConfigurationDeviceRemembering = "no"
)

type DeviceConfigurationParam

type DeviceConfigurationParam struct {
	// always: 常に記憶する(always remember) userOptIn: ユーザーオプトイン(user opt-in)
	// no: (don't save)
	//
	// Any of "always", "userOptIn", "no".
	DeviceRemembering DeviceConfigurationDeviceRemembering `json:"device_remembering,omitzero" api:"required"`
	// contains filtered or unexported fields
}

信頼済みデバイスの記憶の設定(settings for remembering trusted devices)

The property DeviceRemembering is required.

func (DeviceConfigurationParam) MarshalJSON

func (r DeviceConfigurationParam) MarshalJSON() (data []byte, err error)

func (*DeviceConfigurationParam) UnmarshalJSON

func (r *DeviceConfigurationParam) UnmarshalJSON(data []byte) error

type Env

type Env struct {
	// 環境 ID(env ID)
	ID int64 `json:"id" api:"required"`
	// 環境名(env name)
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

環境情報(env info)

func (Env) RawJSON

func (r Env) RawJSON() string

Returns the unmodified JSON received from the API

func (Env) ToParam

func (r Env) ToParam() EnvParam

ToParam converts this Env to a EnvParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EnvParam.Overrides()

func (*Env) UnmarshalJSON

func (r *Env) UnmarshalJSON(data []byte) error

type EnvListResponse

type EnvListResponse struct {
	Envs []Env `json:"envs" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Envs        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

env 一覧(env list)

func (EnvListResponse) RawJSON

func (r EnvListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*EnvListResponse) UnmarshalJSON

func (r *EnvListResponse) UnmarshalJSON(data []byte) error

type EnvNewParams

type EnvNewParams struct {
	// 環境情報(env info)
	Env EnvParam
	// contains filtered or unexported fields
}

func (EnvNewParams) MarshalJSON

func (r EnvNewParams) MarshalJSON() (data []byte, err error)

func (*EnvNewParams) UnmarshalJSON

func (r *EnvNewParams) UnmarshalJSON(data []byte) error

type EnvParam

type EnvParam struct {
	// 環境 ID(env ID)
	ID int64 `json:"id" api:"required"`
	// 環境名(env name)
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

環境情報(env info)

The properties ID, Name are required.

func (EnvParam) MarshalJSON

func (r EnvParam) MarshalJSON() (data []byte, err error)

func (*EnvParam) UnmarshalJSON

func (r *EnvParam) UnmarshalJSON(data []byte) error

type EnvService

type EnvService struct {
	Options []option.RequestOption
}

環境情報(Environment Info)

EnvService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvService method instead.

func NewEnvService

func NewEnvService(opts ...option.RequestOption) (r EnvService)

NewEnvService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvService) Delete

func (r *EnvService) Delete(ctx context.Context, envID int64, opts ...option.RequestOption) (err error)

環境情報を削除します。

Delete env info.

func (*EnvService) Get

func (r *EnvService) Get(ctx context.Context, envID int64, opts ...option.RequestOption) (res *Env, err error)

環境情報の詳細を取得します。

Get environment details.

func (*EnvService) List

func (r *EnvService) List(ctx context.Context, opts ...option.RequestOption) (res *EnvListResponse, err error)

登録されている環境情報を取得します。連携のテストや開発用環境や実際の運用で利用す る環境など複数の環境を定義することができます。

Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation.

func (*EnvService) New

func (r *EnvService) New(ctx context.Context, body EnvNewParams, opts ...option.RequestOption) (res *Env, err error)

環境情報を作成します。連携のテストや開発用環境や実際の運用で利用する環境など複数 の環境を定義することができます。

Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation.

func (*EnvService) Update

func (r *EnvService) Update(ctx context.Context, envID int64, body EnvUpdateParams, opts ...option.RequestOption) (err error)

環境情報を更新します。

Update env info.

type EnvUpdateParams

type EnvUpdateParams struct {
	// 環境名(env name)
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

func (EnvUpdateParams) MarshalJSON

func (r EnvUpdateParams) MarshalJSON() (data []byte, err error)

func (*EnvUpdateParams) UnmarshalJSON

func (r *EnvUpdateParams) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

type IdentityProviderListResponse

type IdentityProviderListResponse struct {
	Google IdentityProviderProps `json:"google" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Google      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IdentityProviderListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*IdentityProviderListResponse) UnmarshalJSON

func (r *IdentityProviderListResponse) UnmarshalJSON(data []byte) error

type IdentityProviderProps

type IdentityProviderProps struct {
	ApplicationID     string `json:"application_id" api:"required"`
	ApplicationSecret string `json:"application_secret" api:"required"`
	ApprovalScope     string `json:"approval_scope" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApplicationID     respjson.Field
		ApplicationSecret respjson.Field
		ApprovalScope     respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IdentityProviderProps) RawJSON

func (r IdentityProviderProps) RawJSON() string

Returns the unmodified JSON received from the API

func (IdentityProviderProps) ToParam

ToParam converts this IdentityProviderProps to a IdentityProviderPropsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with IdentityProviderPropsParam.Overrides()

func (*IdentityProviderProps) UnmarshalJSON

func (r *IdentityProviderProps) UnmarshalJSON(data []byte) error

type IdentityProviderPropsParam

type IdentityProviderPropsParam struct {
	ApplicationID     string `json:"application_id" api:"required"`
	ApplicationSecret string `json:"application_secret" api:"required"`
	ApprovalScope     string `json:"approval_scope" api:"required"`
	// contains filtered or unexported fields
}

The properties ApplicationID, ApplicationSecret, ApprovalScope are required.

func (IdentityProviderPropsParam) MarshalJSON

func (r IdentityProviderPropsParam) MarshalJSON() (data []byte, err error)

func (*IdentityProviderPropsParam) UnmarshalJSON

func (r *IdentityProviderPropsParam) UnmarshalJSON(data []byte) error

type IdentityProviderService

type IdentityProviderService struct {
	Options []option.RequestOption
}

認証情報(Auth Info)

IdentityProviderService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityProviderService method instead.

func NewIdentityProviderService

func NewIdentityProviderService(opts ...option.RequestOption) (r IdentityProviderService)

NewIdentityProviderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IdentityProviderService) List

cognito に設定している外部プロバイダ経由のサインイン情報取得

Get sign-in information via external provider set in cognito

func (*IdentityProviderService) Update

外部 ID プロバイダのサインイン情報更新

type IdentityProviderUpdateParams

type IdentityProviderUpdateParams struct {
	// Any of "Google".
	Provider IdentityProviderUpdateParamsProvider `json:"provider,omitzero" api:"required"`
	// identity_provider_props が null の場合は、provider で指定された外部 ID プロバイ
	// ダのサインイン情報を無効化する。
	IdentityProviderProps IdentityProviderPropsParam `json:"identity_provider_props,omitzero"`
	// contains filtered or unexported fields
}

func (IdentityProviderUpdateParams) MarshalJSON

func (r IdentityProviderUpdateParams) MarshalJSON() (data []byte, err error)

func (*IdentityProviderUpdateParams) UnmarshalJSON

func (r *IdentityProviderUpdateParams) UnmarshalJSON(data []byte) error

type IdentityProviderUpdateParamsProvider

type IdentityProviderUpdateParamsProvider string
const (
	IdentityProviderUpdateParamsProviderGoogle IdentityProviderUpdateParamsProvider = "Google"
)

type MessageTemplate

type MessageTemplate struct {
	// メッセージ(message)
	Message string `json:"message" api:"required"`
	// タイトル(title)
	Subject string `json:"subject" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Subject     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MessageTemplate) RawJSON

func (r MessageTemplate) RawJSON() string

Returns the unmodified JSON received from the API

func (MessageTemplate) ToParam

ToParam converts this MessageTemplate to a MessageTemplateParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MessageTemplateParam.Overrides()

func (*MessageTemplate) UnmarshalJSON

func (r *MessageTemplate) UnmarshalJSON(data []byte) error

type MessageTemplateParam

type MessageTemplateParam struct {
	// メッセージ(message)
	Message string `json:"message" api:"required"`
	// タイトル(title)
	Subject string `json:"subject" api:"required"`
	// contains filtered or unexported fields
}

The properties Message, Subject are required.

func (MessageTemplateParam) MarshalJSON

func (r MessageTemplateParam) MarshalJSON() (data []byte, err error)

func (*MessageTemplateParam) UnmarshalJSON

func (r *MessageTemplateParam) UnmarshalJSON(data []byte) error

type MfaConfiguration

type MfaConfiguration struct {
	// on: 全ユーザーがログイン時に適用(apply when all users log in) optional: MFA 要素
	// が有効になっている個別ユーザーに適用(apply to individual users with MFA factor
	// enabled) ※ パラメータは現在 optional で固定となります。(The parameter is
	// currently optional and fixed.)
	//
	// Any of "on", "optional".
	MfaConfiguration MfaConfigurationMfaConfiguration `json:"mfa_configuration" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MfaConfiguration respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MFA デバイス認証設定(MFA device authentication settings) ※ 未提供の機能のため、 変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.)

func (MfaConfiguration) RawJSON

func (r MfaConfiguration) RawJSON() string

Returns the unmodified JSON received from the API

func (MfaConfiguration) ToParam

ToParam converts this MfaConfiguration to a MfaConfigurationParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MfaConfigurationParam.Overrides()

func (*MfaConfiguration) UnmarshalJSON

func (r *MfaConfiguration) UnmarshalJSON(data []byte) error

type MfaConfigurationMfaConfiguration

type MfaConfigurationMfaConfiguration string

on: 全ユーザーがログイン時に適用(apply when all users log in) optional: MFA 要素 が有効になっている個別ユーザーに適用(apply to individual users with MFA factor enabled) ※ パラメータは現在 optional で固定となります。(The parameter is currently optional and fixed.)

const (
	MfaConfigurationMfaConfigurationOn       MfaConfigurationMfaConfiguration = "on"
	MfaConfigurationMfaConfigurationOptional MfaConfigurationMfaConfiguration = "optional"
)

type MfaConfigurationParam

type MfaConfigurationParam struct {
	// on: 全ユーザーがログイン時に適用(apply when all users log in) optional: MFA 要素
	// が有効になっている個別ユーザーに適用(apply to individual users with MFA factor
	// enabled) ※ パラメータは現在 optional で固定となります。(The parameter is
	// currently optional and fixed.)
	//
	// Any of "on", "optional".
	MfaConfiguration MfaConfigurationMfaConfiguration `json:"mfa_configuration,omitzero" api:"required"`
	// contains filtered or unexported fields
}

MFA デバイス認証設定(MFA device authentication settings) ※ 未提供の機能のため、 変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.)

The property MfaConfiguration is required.

func (MfaConfigurationParam) MarshalJSON

func (r MfaConfigurationParam) MarshalJSON() (data []byte, err error)

func (*MfaConfigurationParam) UnmarshalJSON

func (r *MfaConfigurationParam) UnmarshalJSON(data []byte) error

type MfaPreference

type MfaPreference struct {
	// MFA を有効にするか否か(enable MFA)
	Enabled bool `json:"enabled" api:"required"`
	// MFA の方法(enabled が true の場合は必須)(MFA method (required if enabled is
	// true))
	//
	// Any of "softwareToken".
	Method MfaPreferenceMethod `json:"method"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Method      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MfaPreference) RawJSON

func (r MfaPreference) RawJSON() string

Returns the unmodified JSON received from the API

func (MfaPreference) ToParam

func (r MfaPreference) ToParam() MfaPreferenceParam

ToParam converts this MfaPreference to a MfaPreferenceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MfaPreferenceParam.Overrides()

func (*MfaPreference) UnmarshalJSON

func (r *MfaPreference) UnmarshalJSON(data []byte) error

type MfaPreferenceMethod

type MfaPreferenceMethod string

MFA の方法(enabled が true の場合は必須)(MFA method (required if enabled is true))

const (
	MfaPreferenceMethodSoftwareToken MfaPreferenceMethod = "softwareToken"
)

type MfaPreferenceParam

type MfaPreferenceParam struct {
	// MFA を有効にするか否か(enable MFA)
	Enabled bool `json:"enabled" api:"required"`
	// MFA の方法(enabled が true の場合は必須)(MFA method (required if enabled is
	// true))
	//
	// Any of "softwareToken".
	Method MfaPreferenceMethod `json:"method,omitzero"`
	// contains filtered or unexported fields
}

The property Enabled is required.

func (MfaPreferenceParam) MarshalJSON

func (r MfaPreferenceParam) MarshalJSON() (data []byte, err error)

func (*MfaPreferenceParam) UnmarshalJSON

func (r *MfaPreferenceParam) UnmarshalJSON(data []byte) error

type NotificationMessageListResponse

type NotificationMessageListResponse struct {
	// 認証時の MFA コード送信メール(MFA code email for authentication)
	AuthenticationMfa MessageTemplate `json:"authentication_mfa" api:"required"`
	// 新規ユーザーへの一時パスワード送信メール(send temporary password email to new
	// users)
	CreateUser MessageTemplate `json:"create_user" api:"required"`
	// 忘れたパスワードのリクエスト用の確認コード送信メール(confirmation code email for
	// forgotten password request)
	ForgotPassword MessageTemplate `json:"forgot_password" api:"required"`
	// 既存ユーザーへの確認コード再送メール(confirmation code resend email for existing
	// users)
	ResendCode MessageTemplate `json:"resend_code" api:"required"`
	// ログイン時メール(login email)
	SignUp MessageTemplate `json:"sign_up" api:"required"`
	// 既存ユーザーへの確認コード再送メール(confirmation code resend email for existing
	// users)
	UpdateUserAttribute MessageTemplate `json:"update_user_attribute" api:"required"`
	// 確認メール(confirmation email)
	VerifyUserAttribute MessageTemplate `json:"verify_user_attribute" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AuthenticationMfa   respjson.Field
		CreateUser          respjson.Field
		ForgotPassword      respjson.Field
		ResendCode          respjson.Field
		SignUp              respjson.Field
		UpdateUserAttribute respjson.Field
		VerifyUserAttribute respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NotificationMessageListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*NotificationMessageListResponse) UnmarshalJSON

func (r *NotificationMessageListResponse) UnmarshalJSON(data []byte) error

type NotificationMessageService

type NotificationMessageService struct {
	Options []option.RequestOption
}

基本情報(Basic Info)

NotificationMessageService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNotificationMessageService method instead.

func NewNotificationMessageService

func NewNotificationMessageService(opts ...option.RequestOption) (r NotificationMessageService)

NewNotificationMessageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NotificationMessageService) List

各種通知メールテンプレートを取得します。

Get notification email templates.

func (*NotificationMessageService) Update

各種通知メールテンプレート更新します。

Update notification email template.

type NotificationMessageUpdateParams

type NotificationMessageUpdateParams struct {
	// 認証時の MFA コード送信メール(MFA code email for authentication)
	AuthenticationMfa MessageTemplateParam `json:"authentication_mfa,omitzero"`
	// 新規ユーザーへの一時パスワード送信メール(send temporary password email to new
	// users)
	CreateUser MessageTemplateParam `json:"create_user,omitzero"`
	// 忘れたパスワードのリクエスト用の確認コード送信メール(confirmation code email for
	// forgotten password request)
	ForgotPassword MessageTemplateParam `json:"forgot_password,omitzero"`
	// 既存ユーザーへの確認コード再送メール(confirmation code resend email for existing
	// users)
	ResendCode MessageTemplateParam `json:"resend_code,omitzero"`
	// ログイン時メール(Login email)
	SignUp MessageTemplateParam `json:"sign_up,omitzero"`
	// 既存ユーザーへの確認コード再送メール(confirmation code resend email for existing
	// users)
	UpdateUserAttribute MessageTemplateParam `json:"update_user_attribute,omitzero"`
	// 確認メール(confirmation email)
	VerifyUserAttribute MessageTemplateParam `json:"verify_user_attribute,omitzero"`
	// contains filtered or unexported fields
}

func (NotificationMessageUpdateParams) MarshalJSON

func (r NotificationMessageUpdateParams) MarshalJSON() (data []byte, err error)

func (*NotificationMessageUpdateParams) UnmarshalJSON

func (r *NotificationMessageUpdateParams) UnmarshalJSON(data []byte) error

type PasswordPolicy

type PasswordPolicy struct {
	// 一文字以上の小文字を含むが設定されているか(contains one or more lowercase
	// characters)
	IsRequireLowercase bool `json:"is_require_lowercase" api:"required"`
	// 一文字以上の数字を含むが設定されているか(contains one or more numeric
	// characters)
	IsRequireNumbers bool `json:"is_require_numbers" api:"required"`
	// 一文字以上の特殊文字を含むが設定されているか(contains one or more special
	// characters)
	IsRequireSymbols bool `json:"is_require_symbols" api:"required"`
	// 一文字以上の大文字を含むが設定されているか(contains one or more uppercase
	// letters)
	IsRequireUppercase bool `json:"is_require_uppercase" api:"required"`
	// 最小文字数(minimum number of characters)
	MinimumLength int64 `json:"minimum_length" api:"required"`
	// 仮パスワードの有効期限(temporary password expiration date)
	TemporaryPasswordValidityDays int64 `json:"temporary_password_validity_days" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsRequireLowercase            respjson.Field
		IsRequireNumbers              respjson.Field
		IsRequireSymbols              respjson.Field
		IsRequireUppercase            respjson.Field
		MinimumLength                 respjson.Field
		TemporaryPasswordValidityDays respjson.Field
		ExtraFields                   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

パスワードポリシー(password policy)

func (PasswordPolicy) RawJSON

func (r PasswordPolicy) RawJSON() string

Returns the unmodified JSON received from the API

func (PasswordPolicy) ToParam

func (r PasswordPolicy) ToParam() PasswordPolicyParam

ToParam converts this PasswordPolicy to a PasswordPolicyParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PasswordPolicyParam.Overrides()

func (*PasswordPolicy) UnmarshalJSON

func (r *PasswordPolicy) UnmarshalJSON(data []byte) error

type PasswordPolicyParam

type PasswordPolicyParam struct {
	// 一文字以上の小文字を含むが設定されているか(contains one or more lowercase
	// characters)
	IsRequireLowercase bool `json:"is_require_lowercase" api:"required"`
	// 一文字以上の数字を含むが設定されているか(contains one or more numeric
	// characters)
	IsRequireNumbers bool `json:"is_require_numbers" api:"required"`
	// 一文字以上の特殊文字を含むが設定されているか(contains one or more special
	// characters)
	IsRequireSymbols bool `json:"is_require_symbols" api:"required"`
	// 一文字以上の大文字を含むが設定されているか(contains one or more uppercase
	// letters)
	IsRequireUppercase bool `json:"is_require_uppercase" api:"required"`
	// 最小文字数(minimum number of characters)
	MinimumLength int64 `json:"minimum_length" api:"required"`
	// 仮パスワードの有効期限(temporary password expiration date)
	TemporaryPasswordValidityDays int64 `json:"temporary_password_validity_days" api:"required"`
	// contains filtered or unexported fields
}

パスワードポリシー(password policy)

The properties IsRequireLowercase, IsRequireNumbers, IsRequireSymbols, IsRequireUppercase, MinimumLength, TemporaryPasswordValidityDays are required.

func (PasswordPolicyParam) MarshalJSON

func (r PasswordPolicyParam) MarshalJSON() (data []byte, err error)

func (*PasswordPolicyParam) UnmarshalJSON

func (r *PasswordPolicyParam) UnmarshalJSON(data []byte) error

type RecaptchaProps

type RecaptchaProps struct {
	// シークレットキー(secret key)
	SecretKey string `json:"secret_key" api:"required"`
	// サイトキー(site key)
	SiteKey string `json:"site_key" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SecretKey   respjson.Field
		SiteKey     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

reCAPTCHA 認証設定(reCAPTCHA authentication settings) ※ 未提供の機能のため、変更 ・保存はできません(This function is not yet provided, so it cannot be changed or saved.)

func (RecaptchaProps) RawJSON

func (r RecaptchaProps) RawJSON() string

Returns the unmodified JSON received from the API

func (RecaptchaProps) ToParam

func (r RecaptchaProps) ToParam() RecaptchaPropsParam

ToParam converts this RecaptchaProps to a RecaptchaPropsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with RecaptchaPropsParam.Overrides()

func (*RecaptchaProps) UnmarshalJSON

func (r *RecaptchaProps) UnmarshalJSON(data []byte) error

type RecaptchaPropsParam

type RecaptchaPropsParam struct {
	// シークレットキー(secret key)
	SecretKey string `json:"secret_key" api:"required"`
	// サイトキー(site key)
	SiteKey string `json:"site_key" api:"required"`
	// contains filtered or unexported fields
}

reCAPTCHA 認証設定(reCAPTCHA authentication settings) ※ 未提供の機能のため、変更 ・保存はできません(This function is not yet provided, so it cannot be changed or saved.)

The properties SecretKey, SiteKey are required.

func (RecaptchaPropsParam) MarshalJSON

func (r RecaptchaPropsParam) MarshalJSON() (data []byte, err error)

func (*RecaptchaPropsParam) UnmarshalJSON

func (r *RecaptchaPropsParam) UnmarshalJSON(data []byte) error

type Role

type Role struct {
	// 役割(ロール)表示名(role display name)
	DisplayName string `json:"display_name" api:"required"`
	// 役割(ロール)名(role name)
	RoleName string `json:"role_name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName respjson.Field
		RoleName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

役割(ロール)情報(role info)

func (Role) RawJSON

func (r Role) RawJSON() string

Returns the unmodified JSON received from the API

func (Role) ToParam

func (r Role) ToParam() RoleParam

ToParam converts this Role to a RoleParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with RoleParam.Overrides()

func (*Role) UnmarshalJSON

func (r *Role) UnmarshalJSON(data []byte) error

type RoleListResponse

type RoleListResponse struct {
	Roles []Role `json:"roles" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Roles       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RoleListResponse) RawJSON

func (r RoleListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*RoleListResponse) UnmarshalJSON

func (r *RoleListResponse) UnmarshalJSON(data []byte) error

type RoleNewParams

type RoleNewParams struct {
	// 役割(ロール)情報(role info)
	Role RoleParam
	// contains filtered or unexported fields
}

func (RoleNewParams) MarshalJSON

func (r RoleNewParams) MarshalJSON() (data []byte, err error)

func (*RoleNewParams) UnmarshalJSON

func (r *RoleNewParams) UnmarshalJSON(data []byte) error

type RoleParam

type RoleParam struct {
	// 役割(ロール)表示名(role display name)
	DisplayName string `json:"display_name" api:"required"`
	// 役割(ロール)名(role name)
	RoleName string `json:"role_name" api:"required"`
	// contains filtered or unexported fields
}

役割(ロール)情報(role info)

The properties DisplayName, RoleName are required.

func (RoleParam) MarshalJSON

func (r RoleParam) MarshalJSON() (data []byte, err error)

func (*RoleParam) UnmarshalJSON

func (r *RoleParam) UnmarshalJSON(data []byte) error

type RoleService

type RoleService struct {
	Options []option.RequestOption
}

役割(ロール)(Role)

RoleService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRoleService method instead.

func NewRoleService

func NewRoleService(opts ...option.RequestOption) (r RoleService)

NewRoleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RoleService) Delete

func (r *RoleService) Delete(ctx context.Context, roleName string, opts ...option.RequestOption) (err error)

役割(ロール)を削除します。

Delete role.

func (*RoleService) List

func (r *RoleService) List(ctx context.Context, opts ...option.RequestOption) (res *RoleListResponse, err error)

登録されている役割(ロール)を一覧として取得します。ここで定義した役割をユーザーに 付与することによって、SaaS 側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可 能です。

Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong.

func (*RoleService) New

func (r *RoleService) New(ctx context.Context, body RoleNewParams, opts ...option.RequestOption) (res *Role, err error)

役割(ロール)を作成します。ここで作成した役割をユーザーに付与することによって 、SaaS 側で役割ベースの認可を実装することが用意になります。また、同じユーザーで も、属するテナント・環境ごとに持っている役割を変えることが可能です。

Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong.

type SaasUser

type SaasUser struct {
	// ユーザー ID(User ID)
	ID string `json:"id" api:"required"`
	// メールアドレス(E-mail)
	Email string `json:"email" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Email       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SaasUser) RawJSON

func (r SaasUser) RawJSON() string

Returns the unmodified JSON received from the API

func (*SaasUser) UnmarshalJSON

func (r *SaasUser) UnmarshalJSON(data []byte) error

type SaasidGetResponse

type SaasidGetResponse struct {
	// 環境 ID(Env ID)
	EnvID int64 `json:"env_id" api:"required"`
	// saas id
	SaasID string `json:"saas_id" api:"required"`
	// テナント ID(Tenant ID)
	TenantID string `json:"tenant_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EnvID       respjson.Field
		SaasID      respjson.Field
		TenantID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SaasidGetResponse) RawJSON

func (r SaasidGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SaasidGetResponse) UnmarshalJSON

func (r *SaasidGetResponse) UnmarshalJSON(data []byte) error

type SaasidService

type SaasidService struct {
	Options []option.RequestOption
}

SaaSus テナント(SaaSus Tenant)

SaasidService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaasidService method instead.

func NewSaasidService

func NewSaasidService(opts ...option.RequestOption) (r SaasidService)

NewSaasidService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaasidService) Get

func (r *SaasidService) Get(ctx context.Context, opts ...option.RequestOption) (res *SaasidGetResponse, err error)

テナントの SaasID を取得します。 SaaSus API および SaaSus SDK にて利用します。

Get the tenant's SaasID. Used by SaaSus API and SaaSus SDK.

func (*SaasidService) Update

func (r *SaasidService) Update(ctx context.Context, opts ...option.RequestOption) (err error)

テナントの SaasID を更新します。 SaaSus API および SaaSus SDK にて利用します。既 に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。

Update the tenant's SaasID. Used by SaaSus API and SaaSus SDK. If changed on an SaaS application that is already running, it will affect the behavior.

type SelfRegist

type SelfRegist struct {
	Enable bool `json:"enable" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enable      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

セルフサインアップを許可設定(self sign-up permission)

func (SelfRegist) RawJSON

func (r SelfRegist) RawJSON() string

Returns the unmodified JSON received from the API

func (SelfRegist) ToParam

func (r SelfRegist) ToParam() SelfRegistParam

ToParam converts this SelfRegist to a SelfRegistParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SelfRegistParam.Overrides()

func (*SelfRegist) UnmarshalJSON

func (r *SelfRegist) UnmarshalJSON(data []byte) error

type SelfRegistParam

type SelfRegistParam struct {
	Enable bool `json:"enable" api:"required"`
	// contains filtered or unexported fields
}

セルフサインアップを許可設定(self sign-up permission)

The property Enable is required.

func (SelfRegistParam) MarshalJSON

func (r SelfRegistParam) MarshalJSON() (data []byte, err error)

func (*SelfRegistParam) UnmarshalJSON

func (r *SelfRegistParam) UnmarshalJSON(data []byte) error

type SignInSettingGetResponse

type SignInSettingGetResponse struct {
	// アカウント認証設定(account authentication settings) ※ 未提供の機能のため、変更・
	// 保存はできません(This function is not yet provided, so it cannot be changed or
	// saved.)
	AccountVerification AccountVerification `json:"account_verification" api:"required"`
	// 信頼済みデバイスの記憶の設定(settings for remembering trusted devices)
	DeviceConfiguration DeviceConfiguration `json:"device_configuration" api:"required"`
	// MFA デバイス認証設定(MFA device authentication settings) ※ 未提供の機能のため、
	// 変更・保存はできません(This function is not yet provided, so it cannot be
	// changed or saved.)
	MfaConfiguration MfaConfiguration `json:"mfa_configuration" api:"required"`
	// パスワードポリシー(password policy)
	PasswordPolicy PasswordPolicy `json:"password_policy" api:"required"`
	// reCAPTCHA 認証設定(reCAPTCHA authentication settings) ※ 未提供の機能のため、変更
	// ・保存はできません(This function is not yet provided, so it cannot be changed or
	// saved.)
	RecaptchaProps RecaptchaProps `json:"recaptcha_props" api:"required"`
	// セルフサインアップを許可設定(self sign-up permission)
	SelfRegist SelfRegist `json:"self_regist" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccountVerification respjson.Field
		DeviceConfiguration respjson.Field
		MfaConfiguration    respjson.Field
		PasswordPolicy      respjson.Field
		RecaptchaProps      respjson.Field
		SelfRegist          respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SignInSettingGetResponse) RawJSON

func (r SignInSettingGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SignInSettingGetResponse) UnmarshalJSON

func (r *SignInSettingGetResponse) UnmarshalJSON(data []byte) error

type SignInSettingService

type SignInSettingService struct {
	Options []option.RequestOption
}

認証情報(Auth Info)

SignInSettingService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSignInSettingService method instead.

func NewSignInSettingService

func NewSignInSettingService(opts ...option.RequestOption) (r SignInSettingService)

NewSignInSettingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SignInSettingService) Get

ユーザーパスワードの要件設定を取得します。アルファベット、数字、記号の組み合わせ で、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります 。

Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols.

func (*SignInSettingService) Update

ユーザーパスワードの要件設定を更新します。アルファベット、数字、記号の組み合わせ で、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります 。

Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols.

type SignInSettingUpdateParams

type SignInSettingUpdateParams struct {
	// アカウント認証設定(account authentication settings) ※ 未提供の機能のため、変更・
	// 保存はできません(This function is not yet provided, so it cannot be changed or
	// saved.)
	AccountVerification AccountVerificationParam `json:"account_verification,omitzero"`
	// 信頼済みデバイスの記憶の設定(settings for remembering trusted devices)
	DeviceConfiguration DeviceConfigurationParam `json:"device_configuration,omitzero"`
	// MFA デバイス認証設定(MFA device authentication settings) ※ 未提供の機能のため、
	// 変更・保存はできません(This function is not yet provided, so it cannot be
	// changed or saved.)
	MfaConfiguration MfaConfigurationParam `json:"mfa_configuration,omitzero"`
	// パスワードポリシー(password policy)
	PasswordPolicy PasswordPolicyParam `json:"password_policy,omitzero"`
	// reCAPTCHA 認証設定(reCAPTCHA authentication settings) ※ 未提供の機能のため、変更
	// ・保存はできません(This function is not yet provided, so it cannot be changed or
	// saved.)
	RecaptchaProps RecaptchaPropsParam `json:"recaptcha_props,omitzero"`
	// セルフサインアップを許可設定(self sign-up permission)
	SelfRegist SelfRegistParam `json:"self_regist,omitzero"`
	// contains filtered or unexported fields
}

func (SignInSettingUpdateParams) MarshalJSON

func (r SignInSettingUpdateParams) MarshalJSON() (data []byte, err error)

func (*SignInSettingUpdateParams) UnmarshalJSON

func (r *SignInSettingUpdateParams) UnmarshalJSON(data []byte) error

type StripeService

type StripeService struct {
	Options []option.RequestOption
}

テナント(Tenant)

StripeService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStripeService method instead.

func NewStripeService

func NewStripeService(opts ...option.RequestOption) (r StripeService)

NewStripeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*StripeService) DeleteCustomerProduct

func (r *StripeService) DeleteCustomerProduct(ctx context.Context, opts ...option.RequestOption) (err error)

stripe 上の顧客情報・商品情報を削除します

Delete customer and product from Stripe.

func (*StripeService) Initialize

func (r *StripeService) Initialize(ctx context.Context, opts ...option.RequestOption) (err error)

billing 経由で stripe へ初期情報を設定

Set Stripe initial information via billing

type Tenant

type Tenant struct {
	// テナント ID(tenant ID)
	ID string `json:"id" api:"required"`
	// 料金プラン履歴
	PlanHistories []TenantPlanHistory `json:"plan_histories" api:"required"`
	// 料金プラン ID(plan ID)
	PlanID string `json:"plan_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		PlanHistories respjson.Field
		PlanID        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	TenantProps
}

func (Tenant) RawJSON

func (r Tenant) RawJSON() string

Returns the unmodified JSON received from the API

func (*Tenant) UnmarshalJSON

func (r *Tenant) UnmarshalJSON(data []byte) error

type TenantAllService

type TenantAllService struct {
	Options []option.RequestOption
	// Tenant 単位のユーザー(Tenant User)
	Users TenantAllUserService
}

TenantAllService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantAllService method instead.

func NewTenantAllService

func NewTenantAllService(opts ...option.RequestOption) (r TenantAllService)

NewTenantAllService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type TenantAllUserService

type TenantAllUserService struct {
	Options []option.RequestOption
}

Tenant 単位のユーザー(Tenant User)

TenantAllUserService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantAllUserService method instead.

func NewTenantAllUserService

func NewTenantAllUserService(opts ...option.RequestOption) (r TenantAllUserService)

NewTenantAllUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TenantAllUserService) Get

func (r *TenantAllUserService) Get(ctx context.Context, userID string, opts ...option.RequestOption) (res *Users, err error)

ユーザー ID からテナントに所属しているユーザー情報を取得します。複数テナントに所 属している場合は別のオブジェクトとして返却されます。

Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object.

func (*TenantAllUserService) List

func (r *TenantAllUserService) List(ctx context.Context, opts ...option.RequestOption) (res *Users, err error)

テナントに所属しているユーザー全件を取得します。複数テナントに所属する同一ユーザ ーは別のオブジェクトとして返却されます。 id は一意ではありません。

Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique.

type TenantAttributeListResponse

type TenantAttributeListResponse struct {
	// テナント属性定義(Tenant Attribute Definition)
	TenantAttributes []Attribute `json:"tenant_attributes" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		TenantAttributes respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TenantAttributeListResponse) RawJSON

func (r TenantAttributeListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TenantAttributeListResponse) UnmarshalJSON

func (r *TenantAttributeListResponse) UnmarshalJSON(data []byte) error

type TenantAttributeNewParams

type TenantAttributeNewParams struct {
	Attribute AttributeParam
	// contains filtered or unexported fields
}

func (TenantAttributeNewParams) MarshalJSON

func (r TenantAttributeNewParams) MarshalJSON() (data []byte, err error)

func (*TenantAttributeNewParams) UnmarshalJSON

func (r *TenantAttributeNewParams) UnmarshalJSON(data []byte) error

type TenantAttributeService

type TenantAttributeService struct {
	Options []option.RequestOption
}

テナントの追加属性(Additional Tenant Attributes)

TenantAttributeService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantAttributeService method instead.

func NewTenantAttributeService

func NewTenantAttributeService(opts ...option.RequestOption) (r TenantAttributeService)

NewTenantAttributeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TenantAttributeService) Delete

func (r *TenantAttributeService) Delete(ctx context.Context, attributeName string, opts ...option.RequestOption) (err error)

SaaSus Platform で管理する、テナントの追加属性の削除を行います。

Deletes tenant attributes managed by SaaSus Platform.

func (*TenantAttributeService) List

SaaSus Platform で管理する、テナントの追加属性の定義を取得します。例えばテナント の呼び名やメモなどをを持たせることができ、SaaS から SaaSus SDK/API を利用して取 得することができます。

Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API.

func (*TenantAttributeService) New

SaaSus Platform で管理する、テナントの追加属性の登録を行います。例えばテナントの 呼び名やメモなどをを持たせることができ、SaaS から SaaSus SDK/API を利用して取得 することができます。

Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API.

type TenantListResponse

type TenantListResponse struct {
	Tenants []Tenant `json:"tenants" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Tenants     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

テナント情報(Tenant Info)

func (TenantListResponse) RawJSON

func (r TenantListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TenantListResponse) UnmarshalJSON

func (r *TenantListResponse) UnmarshalJSON(data []byte) error

type TenantNewParams

type TenantNewParams struct {
	TenantProps TenantPropsParam
	// contains filtered or unexported fields
}

func (TenantNewParams) MarshalJSON

func (r TenantNewParams) MarshalJSON() (data []byte, err error)

func (*TenantNewParams) UnmarshalJSON

func (r *TenantNewParams) UnmarshalJSON(data []byte) error

type TenantPlanHistory

type TenantPlanHistory struct {
	// 登録日時
	PlanAppliedAt int64 `json:"plan_applied_at" api:"required"`
	// 料金プラン ID
	PlanID string `json:"plan_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PlanAppliedAt respjson.Field
		PlanID        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TenantPlanHistory) RawJSON

func (r TenantPlanHistory) RawJSON() string

Returns the unmodified JSON received from the API

func (*TenantPlanHistory) UnmarshalJSON

func (r *TenantPlanHistory) UnmarshalJSON(data []byte) error

type TenantProps

type TenantProps struct {
	// 属性情報(attribute info)
	Attributes map[string]any `json:"attributes" api:"required"`
	// 事務管理部門スタッフメールアドレス(administrative staff email address)
	BackOfficeStaffEmail string `json:"back_office_staff_email" api:"required"`
	// テナント名(tenant name)
	Name string `json:"name" api:"required"`
	// 次回料金プラン ID(next billing plan ID)
	NextPlanID string `json:"next_plan_id"`
	// 次回料金プラン開始日時(stripe 連携時、当月月初の 0 時(UTC)を指定すると当月月
	// 初開始のサブスクリプションを作成できます。ex. 2023 年 1 月の場合は、1672531200
	// ) (Next billing plan start time (When using stripe, you can create a
	// subscription that starts at the beginning of the current month by specifying
	// 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January
	// 2023.))
	UsingNextPlanFrom int64 `json:"using_next_plan_from"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Attributes           respjson.Field
		BackOfficeStaffEmail respjson.Field
		Name                 respjson.Field
		NextPlanID           respjson.Field
		UsingNextPlanFrom    respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TenantProps) RawJSON

func (r TenantProps) RawJSON() string

Returns the unmodified JSON received from the API

func (TenantProps) ToParam

func (r TenantProps) ToParam() TenantPropsParam

ToParam converts this TenantProps to a TenantPropsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TenantPropsParam.Overrides()

func (*TenantProps) UnmarshalJSON

func (r *TenantProps) UnmarshalJSON(data []byte) error

type TenantPropsParam

type TenantPropsParam struct {
	// 属性情報(attribute info)
	Attributes map[string]any `json:"attributes,omitzero" api:"required"`
	// 事務管理部門スタッフメールアドレス(administrative staff email address)
	BackOfficeStaffEmail string `json:"back_office_staff_email" api:"required"`
	// テナント名(tenant name)
	Name string `json:"name" api:"required"`
	// 次回料金プラン ID(next billing plan ID)
	NextPlanID param.Opt[string] `json:"next_plan_id,omitzero"`
	// 次回料金プラン開始日時(stripe 連携時、当月月初の 0 時(UTC)を指定すると当月月
	// 初開始のサブスクリプションを作成できます。ex. 2023 年 1 月の場合は、1672531200
	// ) (Next billing plan start time (When using stripe, you can create a
	// subscription that starts at the beginning of the current month by specifying
	// 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January
	// 2023.))
	UsingNextPlanFrom param.Opt[int64] `json:"using_next_plan_from,omitzero"`
	// contains filtered or unexported fields
}

The properties Attributes, BackOfficeStaffEmail, Name are required.

func (TenantPropsParam) MarshalJSON

func (r TenantPropsParam) MarshalJSON() (data []byte, err error)

func (*TenantPropsParam) UnmarshalJSON

func (r *TenantPropsParam) UnmarshalJSON(data []byte) error

type TenantService

type TenantService struct {
	Options []option.RequestOption
	All     TenantAllService
	// Tenant 単位のユーザー(Tenant User)
	Users TenantUserService
}

テナント(Tenant)

TenantService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantService method instead.

func NewTenantService

func NewTenantService(opts ...option.RequestOption) (r TenantService)

NewTenantService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TenantService) Delete

func (r *TenantService) Delete(ctx context.Context, tenantID string, opts ...option.RequestOption) (err error)

SaaSus Platform で管理する、テナントの詳細情報を削除します。

Delete SaaSus Platform tenant.

func (*TenantService) Get

func (r *TenantService) Get(ctx context.Context, tenantID string, opts ...option.RequestOption) (res *Tenant, err error)

SaaSus Platform で管理する、テナントの詳細情報を取得します。

Get the details of tenant managed on the SaaSus Platform.

func (*TenantService) List

func (r *TenantService) List(ctx context.Context, opts ...option.RequestOption) (res *TenantListResponse, err error)

SaaSus Platform で管理する、テナント情報の取得を行います。

Get tenants managed by SaaSus Platform.

func (*TenantService) New

func (r *TenantService) New(ctx context.Context, body TenantNewParams, opts ...option.RequestOption) (res *Tenant, err error)

SaaSus Platform で管理する、テナント情報を作成します。

Create a tenant managed by the SaaSus Platform.

func (*TenantService) Update

func (r *TenantService) Update(ctx context.Context, tenantID string, body TenantUpdateParams, opts ...option.RequestOption) (err error)

SaaSus Platform で管理する、テナントの詳細情報を更新します。

Update SaaSus Platform tenant details.

type TenantUpdateParams

type TenantUpdateParams struct {
	TenantProps TenantPropsParam
	// contains filtered or unexported fields
}

func (TenantUpdateParams) MarshalJSON

func (r TenantUpdateParams) MarshalJSON() (data []byte, err error)

func (*TenantUpdateParams) UnmarshalJSON

func (r *TenantUpdateParams) UnmarshalJSON(data []byte) error

type TenantUserDeleteParams

type TenantUserDeleteParams struct {
	TenantID string `path:"tenant_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type TenantUserEnvRoleDeleteParams

type TenantUserEnvRoleDeleteParams struct {
	TenantID string `path:"tenant_id" api:"required" json:"-"`
	UserID   string `path:"user_id" api:"required" json:"-"`
	EnvID    int64  `path:"env_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type TenantUserEnvRoleNewParams

type TenantUserEnvRoleNewParams struct {
	TenantID string `path:"tenant_id" api:"required" json:"-"`
	UserID   string `path:"user_id" api:"required" json:"-"`
	// 役割(ロール)情報(Role Info)
	RoleNames []string `json:"role_names,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (TenantUserEnvRoleNewParams) MarshalJSON

func (r TenantUserEnvRoleNewParams) MarshalJSON() (data []byte, err error)

func (*TenantUserEnvRoleNewParams) UnmarshalJSON

func (r *TenantUserEnvRoleNewParams) UnmarshalJSON(data []byte) error

type TenantUserEnvRoleService

type TenantUserEnvRoleService struct {
	Options []option.RequestOption
}

Tenant 単位のユーザー(Tenant User)

TenantUserEnvRoleService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantUserEnvRoleService method instead.

func NewTenantUserEnvRoleService

func NewTenantUserEnvRoleService(opts ...option.RequestOption) (r TenantUserEnvRoleService)

NewTenantUserEnvRoleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TenantUserEnvRoleService) Delete

テナントのユーザーから役割(ロール)を削除します。

Remove a role from a tenant user.

func (*TenantUserEnvRoleService) New

テナントのユーザーに役割(ロール)を作成します。

Create roles on tenant users.

type TenantUserEnvService

type TenantUserEnvService struct {
	Options []option.RequestOption
	// Tenant 単位のユーザー(Tenant User)
	Roles TenantUserEnvRoleService
}

TenantUserEnvService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantUserEnvService method instead.

func NewTenantUserEnvService

func NewTenantUserEnvService(opts ...option.RequestOption) (r TenantUserEnvService)

NewTenantUserEnvService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type TenantUserGetParams

type TenantUserGetParams struct {
	TenantID string `path:"tenant_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type TenantUserNewParams

type TenantUserNewParams struct {
	// 属性情報(SaaS 開発コンソールでテナント属性定義を行い設定された情報を取得します
	// )
	//
	// Attribute information (Get information set by defining tenant attributes in the
	// SaaS development console)
	Attributes map[string]any `json:"attributes,omitzero" api:"required"`
	// メールアドレス(e-mail)
	Email string `json:"email" api:"required"`
	// contains filtered or unexported fields
}

func (TenantUserNewParams) MarshalJSON

func (r TenantUserNewParams) MarshalJSON() (data []byte, err error)

func (*TenantUserNewParams) UnmarshalJSON

func (r *TenantUserNewParams) UnmarshalJSON(data []byte) error

type TenantUserService

type TenantUserService struct {
	Options []option.RequestOption
	Envs    TenantUserEnvService
}

Tenant 単位のユーザー(Tenant User)

TenantUserService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTenantUserService method instead.

func NewTenantUserService

func NewTenantUserService(opts ...option.RequestOption) (r TenantUserService)

NewTenantUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TenantUserService) Delete

func (r *TenantUserService) Delete(ctx context.Context, userID string, body TenantUserDeleteParams, opts ...option.RequestOption) (err error)

テナントからユーザーを削除します。

Delete a user from your tenant.

func (*TenantUserService) Get

func (r *TenantUserService) Get(ctx context.Context, userID string, query TenantUserGetParams, opts ...option.RequestOption) (res *User, err error)

テナントのユーザーを ID から一件取得します。

Get one tenant user by specific ID.

func (*TenantUserService) List

func (r *TenantUserService) List(ctx context.Context, tenantID string, opts ...option.RequestOption) (res *Users, err error)

テナントに所属するユーザーを全件取得します。 id は一意です。

Get all the users belonging to the tenant. Id is unique.

func (*TenantUserService) New

func (r *TenantUserService) New(ctx context.Context, tenantID string, body TenantUserNewParams, opts ...option.RequestOption) (res *User, err error)

テナントにユーザーを作成します。 attributes を空のオブジェクトにした場合、追加属 性は空で作成されます。

Create a tenant user. If attributes is empty, the additional attributes will be created empty.

func (*TenantUserService) Update

func (r *TenantUserService) Update(ctx context.Context, userID string, params TenantUserUpdateParams, opts ...option.RequestOption) (err error)

テナントのユーザー属性情報を更新します。

Update tenant user attributes.

type TenantUserUpdateParams

type TenantUserUpdateParams struct {
	TenantID string `path:"tenant_id" api:"required" json:"-"`
	// 属性情報(SaaS 開発コンソールでテナント属性定義を行い設定された情報を取得します
	// )
	//
	// Attribute information (Get information set by defining tenant attributes in the
	// SaaS development console)
	Attributes map[string]any `json:"attributes,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (TenantUserUpdateParams) MarshalJSON

func (r TenantUserUpdateParams) MarshalJSON() (data []byte, err error)

func (*TenantUserUpdateParams) UnmarshalJSON

func (r *TenantUserUpdateParams) UnmarshalJSON(data []byte) error

type User

type User struct {
	// ユーザー ID(User ID)
	ID string `json:"id" api:"required"`
	// 属性情報(SaaS 開発コンソールでテナント属性定義を行い設定された情報を取得します
	// )
	//
	// Attribute information (Get information set by defining tenant attributes in the
	// SaaS development console)
	Attributes map[string]any `json:"attributes" api:"required"`
	// メールアドレス(E-mail)
	Email string             `json:"email" api:"required"`
	Envs  []UserAvailableEnv `json:"envs" api:"required"`
	// テナント ID(Tenant ID)
	TenantID string `json:"tenant_id" api:"required"`
	// テナント名(Tenant Name)
	TenantName string `json:"tenant_name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Attributes  respjson.Field
		Email       respjson.Field
		Envs        respjson.Field
		TenantID    respjson.Field
		TenantName  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (User) RawJSON

func (r User) RawJSON() string

Returns the unmodified JSON received from the API

func (*User) UnmarshalJSON

func (r *User) UnmarshalJSON(data []byte) error

type UserAttributeListResponse

type UserAttributeListResponse struct {
	// ユーザー属性定義(User attribute definition)
	UserAttributes []Attribute `json:"user_attributes" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		UserAttributes respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserAttributeListResponse) RawJSON

func (r UserAttributeListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserAttributeListResponse) UnmarshalJSON

func (r *UserAttributeListResponse) UnmarshalJSON(data []byte) error

type UserAttributeNewParams

type UserAttributeNewParams struct {
	Attribute AttributeParam
	// contains filtered or unexported fields
}

func (UserAttributeNewParams) MarshalJSON

func (r UserAttributeNewParams) MarshalJSON() (data []byte, err error)

func (*UserAttributeNewParams) UnmarshalJSON

func (r *UserAttributeNewParams) UnmarshalJSON(data []byte) error

type UserAttributeService

type UserAttributeService struct {
	Options []option.RequestOption
}

ユーザーの追加属性(Additional User Attributes)

UserAttributeService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserAttributeService method instead.

func NewUserAttributeService

func NewUserAttributeService(opts ...option.RequestOption) (r UserAttributeService)

NewUserAttributeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserAttributeService) Delete

func (r *UserAttributeService) Delete(ctx context.Context, attributeName string, opts ...option.RequestOption) (err error)

SaaSus Platform にて保持するユーザーの追加属性を削除します。

Delete user attributes kept on the SaaSus Platform.

func (*UserAttributeService) List

SaaSus Platform にて保持するユーザーの追加属性を取得します。例えば、ユーザー名を 持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます 。一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性 定義を行わずに SaaS 側で個人情報を持つことを検討してください。

Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition.

func (*UserAttributeService) New

SaaSus Platform にて保持するユーザーの追加属性を登録します。例えば、ユーザー名を 持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます 。一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性 定義を行わずに SaaS 側で個人情報を持つことを検討してください。

Create additional user attributes to be kept on the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition.

type UserAvailableEnv

type UserAvailableEnv struct {
	// 環境 ID(env ID)
	ID int64 `json:"id" api:"required"`
	// 環境名(env name)
	Name string `json:"name" api:"required"`
	// 役割(ロール)情報(role info)
	Roles []Role `json:"roles" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Name        respjson.Field
		Roles       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserAvailableEnv) RawJSON

func (r UserAvailableEnv) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserAvailableEnv) UnmarshalJSON

func (r *UserAvailableEnv) UnmarshalJSON(data []byte) error

type UserChangeEmailParams

type UserChangeEmailParams struct {
	// メールアドレス(e-mail)
	Email string `json:"email" api:"required"`
	// contains filtered or unexported fields
}

func (UserChangeEmailParams) MarshalJSON

func (r UserChangeEmailParams) MarshalJSON() (data []byte, err error)

func (*UserChangeEmailParams) UnmarshalJSON

func (r *UserChangeEmailParams) UnmarshalJSON(data []byte) error

type UserChangePasswordParams

type UserChangePasswordParams struct {
	// パスワード(password)
	Password string `json:"password" api:"required"`
	// contains filtered or unexported fields
}

func (UserChangePasswordParams) MarshalJSON

func (r UserChangePasswordParams) MarshalJSON() (data []byte, err error)

func (*UserChangePasswordParams) UnmarshalJSON

func (r *UserChangePasswordParams) UnmarshalJSON(data []byte) error

type UserListResponse

type UserListResponse struct {
	Users []SaasUser `json:"users" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Users       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserListResponse) RawJSON

func (r UserListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserListResponse) UnmarshalJSON

func (r *UserListResponse) UnmarshalJSON(data []byte) error

type UserMfaPreferenceService

type UserMfaPreferenceService struct {
	Options []option.RequestOption
}

SaaS 単位のユーザー(SaaS User)

UserMfaPreferenceService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserMfaPreferenceService method instead.

func NewUserMfaPreferenceService

func NewUserMfaPreferenceService(opts ...option.RequestOption) (r UserMfaPreferenceService)

NewUserMfaPreferenceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserMfaPreferenceService) Get

func (r *UserMfaPreferenceService) Get(ctx context.Context, userID string, opts ...option.RequestOption) (res *MfaPreference, err error)

ユーザーの MFA 設定を取得します。

Get the user's MFA settings.

func (*UserMfaPreferenceService) Update

ユーザーの MFA 設定を更新します。

Update user's MFA settings.

type UserMfaPreferenceUpdateParams

type UserMfaPreferenceUpdateParams struct {
	MfaPreference MfaPreferenceParam
	// contains filtered or unexported fields
}

func (UserMfaPreferenceUpdateParams) MarshalJSON

func (r UserMfaPreferenceUpdateParams) MarshalJSON() (data []byte, err error)

func (*UserMfaPreferenceUpdateParams) UnmarshalJSON

func (r *UserMfaPreferenceUpdateParams) UnmarshalJSON(data []byte) error

type UserMfaService

type UserMfaService struct {
	Options []option.RequestOption
	// SaaS 単位のユーザー(SaaS User)
	SoftwareToken UserMfaSoftwareTokenService
	// SaaS 単位のユーザー(SaaS User)
	Preference UserMfaPreferenceService
}

UserMfaService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserMfaService method instead.

func NewUserMfaService

func NewUserMfaService(opts ...option.RequestOption) (r UserMfaService)

NewUserMfaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type UserMfaSoftwareTokenNewSecretCodeParams

type UserMfaSoftwareTokenNewSecretCodeParams struct {
	// アクセストークン(access token)
	AccessToken string `json:"access_token" api:"required"`
	// contains filtered or unexported fields
}

func (UserMfaSoftwareTokenNewSecretCodeParams) MarshalJSON

func (r UserMfaSoftwareTokenNewSecretCodeParams) MarshalJSON() (data []byte, err error)

func (*UserMfaSoftwareTokenNewSecretCodeParams) UnmarshalJSON

func (r *UserMfaSoftwareTokenNewSecretCodeParams) UnmarshalJSON(data []byte) error

type UserMfaSoftwareTokenNewSecretCodeResponse

type UserMfaSoftwareTokenNewSecretCodeResponse struct {
	// シークレットコード(secret code)
	SecretCode string `json:"secret_code" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SecretCode  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserMfaSoftwareTokenNewSecretCodeResponse) RawJSON

Returns the unmodified JSON received from the API

func (*UserMfaSoftwareTokenNewSecretCodeResponse) UnmarshalJSON

func (r *UserMfaSoftwareTokenNewSecretCodeResponse) UnmarshalJSON(data []byte) error

type UserMfaSoftwareTokenRegisterParams

type UserMfaSoftwareTokenRegisterParams struct {
	// アクセストークン(access token)
	AccessToken string `json:"access_token" api:"required"`
	// 検証コード(verification code)
	VerificationCode string `json:"verification_code" api:"required"`
	// contains filtered or unexported fields
}

func (UserMfaSoftwareTokenRegisterParams) MarshalJSON

func (r UserMfaSoftwareTokenRegisterParams) MarshalJSON() (data []byte, err error)

func (*UserMfaSoftwareTokenRegisterParams) UnmarshalJSON

func (r *UserMfaSoftwareTokenRegisterParams) UnmarshalJSON(data []byte) error

type UserMfaSoftwareTokenService

type UserMfaSoftwareTokenService struct {
	Options []option.RequestOption
}

SaaS 単位のユーザー(SaaS User)

UserMfaSoftwareTokenService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserMfaSoftwareTokenService method instead.

func NewUserMfaSoftwareTokenService

func NewUserMfaSoftwareTokenService(opts ...option.RequestOption) (r UserMfaSoftwareTokenService)

NewUserMfaSoftwareTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserMfaSoftwareTokenService) NewSecretCode

認証アプリケーション登録用のシークレットコードを作成します。

Create a secret code for authentication application registration.

func (*UserMfaSoftwareTokenService) Register

認証アプリケーションを登録します。

Register an authentication application.

type UserNewParams

type UserNewParams struct {
	// メールアドレス(E-mail)
	Email string `json:"email" api:"required"`
	// パスワード(Password)
	Password string `json:"password" api:"required"`
	// contains filtered or unexported fields
}

func (UserNewParams) MarshalJSON

func (r UserNewParams) MarshalJSON() (data []byte, err error)

func (*UserNewParams) UnmarshalJSON

func (r *UserNewParams) UnmarshalJSON(data []byte) error

type UserService

type UserService struct {
	Options []option.RequestOption
	Mfa     UserMfaService
}

SaaS 単位のユーザー(SaaS User)

UserService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.

func NewUserService

func NewUserService(opts ...option.RequestOption) (r UserService)

NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserService) ChangeEmail

func (r *UserService) ChangeEmail(ctx context.Context, userID string, body UserChangeEmailParams, opts ...option.RequestOption) (err error)

ユーザーのメールアドレスを変更します。

Change user's email.

func (*UserService) ChangePassword

func (r *UserService) ChangePassword(ctx context.Context, userID string, body UserChangePasswordParams, opts ...option.RequestOption) (err error)

ユーザーのログインパスワードを変更します。

Change user's login password.

func (*UserService) Delete

func (r *UserService) Delete(ctx context.Context, userID string, opts ...option.RequestOption) (err error)

ユーザー ID を元に一致するユーザーをテナントからすべて削除し、SaaS からも削除し ます。

Delete all users with matching user ID from the tenant and SaaS.

func (*UserService) Get

func (r *UserService) Get(ctx context.Context, userID string, opts ...option.RequestOption) (res *SaasUser, err error)

ユーザー ID からユーザー情報を取得します。

Get user information based on user ID.

func (*UserService) List

func (r *UserService) List(ctx context.Context, opts ...option.RequestOption) (res *UserListResponse, err error)

SaaS のユーザー全件を取得します。

Get all SaaS users.

func (*UserService) New

func (r *UserService) New(ctx context.Context, body UserNewParams, opts ...option.RequestOption) (res *SaasUser, err error)

SaaS にユーザーを作成します。

Create SaaS User.

func (*UserService) UnlinkProvider

func (r *UserService) UnlinkProvider(ctx context.Context, providerName UserUnlinkProviderParamsProviderName, body UserUnlinkProviderParams, opts ...option.RequestOption) (err error)

外部 ID プロバイダの連携を解除します。

Unlink external identity providers.

type UserUnlinkProviderParams

type UserUnlinkProviderParams struct {
	UserID string `path:"user_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type UserUnlinkProviderParamsProviderName

type UserUnlinkProviderParamsProviderName string
const (
	UserUnlinkProviderParamsProviderNameGoogle UserUnlinkProviderParamsProviderName = "Google"
)

type UserinfoGetParams

type UserinfoGetParams struct {
	// ID トークン(ID Token)
	Token string `query:"token" api:"required" json:"-"`
	// contains filtered or unexported fields
}

func (UserinfoGetParams) URLQuery

func (r UserinfoGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes UserinfoGetParams's query parameters as `url.Values`.

type UserinfoGetResponse

type UserinfoGetResponse struct {
	// uuid
	ID string `json:"id" api:"required"`
	// メールアドレス(E-mail)
	Email string `json:"email" api:"required"`
	// テナント情報(Tenant Info)
	Tenants []UserinfoGetResponseTenant `json:"tenants" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Email       respjson.Field
		Tenants     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserinfoGetResponse) RawJSON

func (r UserinfoGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserinfoGetResponse) UnmarshalJSON

func (r *UserinfoGetResponse) UnmarshalJSON(data []byte) error

type UserinfoGetResponseTenant

type UserinfoGetResponseTenant struct {
	// テナント ID(tenant ID)
	ID string `json:"id" api:"required"`
	// バックオフィス担当者のメール(back office contact email)
	BackOfficeStaffEmail string `json:"back_office_staff_email" api:"required"`
	CompletedSignUp      bool   `json:"completed_sign_up" api:"required"`
	// 環境情報、役割(ロール)情報(environmental info, role info)
	Envs []UserAvailableEnv `json:"envs" api:"required"`
	// テナント名(tenant name)
	Name string `json:"name" api:"required"`
	// ユーザー追加属性(user additional attributes)
	UserAttribute map[string]any `json:"user_attribute" api:"required"`
	// 料金プラン ID(plan ID)
	PlanID string `json:"plan_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		BackOfficeStaffEmail respjson.Field
		CompletedSignUp      respjson.Field
		Envs                 respjson.Field
		Name                 respjson.Field
		UserAttribute        respjson.Field
		PlanID               respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserinfoGetResponseTenant) RawJSON

func (r UserinfoGetResponseTenant) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserinfoGetResponseTenant) UnmarshalJSON

func (r *UserinfoGetResponseTenant) UnmarshalJSON(data []byte) error

type UserinfoService

type UserinfoService struct {
	Options []option.RequestOption
}

UserinfoService contains methods and other services that help with interacting with the Saasus Platform API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserinfoService method instead.

func NewUserinfoService

func NewUserinfoService(opts ...option.RequestOption) (r UserinfoService)

NewUserinfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserinfoService) Get

SaaS 利用ユーザ(登録ユーザ)の ID トークンを元に、ユーザ情報を取得します。 ID ト ークンは、SaaSus Platform 生成のログイン画面からログイン時に Callback URL に渡さ れます。サーバ側でその URL から ID トークンを取得し、この API を呼ぶことにより、 該当ユーザの情報が取得できます。取得した上には、所属テナントや役割(ロール)、料金 プランなどが含まれているため、それを元に認可の実装を行うことが可能です。

User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it.

type Users

type Users struct {
	Users []User `json:"users" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Users       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Users) RawJSON

func (r Users) RawJSON() string

Returns the unmodified JSON received from the API

func (*Users) UnmarshalJSON

func (r *Users) UnmarshalJSON(data []byte) error

Directories

Path Synopsis
examples
get_token command
userinfo command
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
packages
shared
tests
contract
Package contract はHTTPレベルのコントラクトテストフレームワークを提供する。
Package contract はHTTPレベルのコントラクトテストフレームワークを提供する。
v2
Package v2 はStainless生成SDK(v2)のコントラクトテストアダプターを提供する。
Package v2 はStainless生成SDK(v2)のコントラクトテストアダプターを提供する。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL