github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/gregor1/auth_internal.go (about)

     1  // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
     2  //   Input file: avdl/gregor1/auth_internal.avdl
     3  
     4  package gregor1
     5  
     6  import (
     7  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
     8  	context "golang.org/x/net/context"
     9  	"time"
    10  )
    11  
    12  type CreateGregorSuperUserSessionTokenArg struct {
    13  }
    14  
    15  type AuthInternalInterface interface {
    16  	CreateGregorSuperUserSessionToken(context.Context) (SessionToken, error)
    17  }
    18  
    19  func AuthInternalProtocol(i AuthInternalInterface) rpc.Protocol {
    20  	return rpc.Protocol{
    21  		Name: "gregor.1.authInternal",
    22  		Methods: map[string]rpc.ServeHandlerDescription{
    23  			"createGregorSuperUserSessionToken": {
    24  				MakeArg: func() interface{} {
    25  					var ret [1]CreateGregorSuperUserSessionTokenArg
    26  					return &ret
    27  				},
    28  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    29  					ret, err = i.CreateGregorSuperUserSessionToken(ctx)
    30  					return
    31  				},
    32  			},
    33  		},
    34  	}
    35  }
    36  
    37  type AuthInternalClient struct {
    38  	Cli rpc.GenericClient
    39  }
    40  
    41  func (c AuthInternalClient) CreateGregorSuperUserSessionToken(ctx context.Context) (res SessionToken, err error) {
    42  	err = c.Cli.Call(ctx, "gregor.1.authInternal.createGregorSuperUserSessionToken", []interface{}{CreateGregorSuperUserSessionTokenArg{}}, &res, 0*time.Millisecond)
    43  	return
    44  }