github.com/pachyderm/pachyderm@v1.13.4/src/server/auth/iface.go (about)

     1  package auth
     2  
     3  import (
     4  	"github.com/pachyderm/pachyderm/src/client/auth"
     5  	"github.com/pachyderm/pachyderm/src/client/pfs"
     6  	"github.com/pachyderm/pachyderm/src/server/pkg/transactionenv/txncontext"
     7  )
     8  
     9  // TransactionServer is an interface for the transactionally-supported
    10  // methods that can be called through the auth server.
    11  type TransactionServer interface {
    12  	AuthorizeInTransaction(*txncontext.TransactionContext, *auth.AuthorizeRequest) (*auth.AuthorizeResponse, error)
    13  
    14  	GetScopeInTransaction(*txncontext.TransactionContext, *auth.GetScopeRequest) (*auth.GetScopeResponse, error)
    15  	SetScopeInTransaction(*txncontext.TransactionContext, *auth.SetScopeRequest) (*auth.SetScopeResponse, error)
    16  
    17  	GetACLInTransaction(*txncontext.TransactionContext, *auth.GetACLRequest) (*auth.GetACLResponse, error)
    18  	SetACLInTransaction(*txncontext.TransactionContext, *auth.SetACLRequest) (*auth.SetACLResponse, error)
    19  
    20  	GetAuthTokenInTransaction(*txncontext.TransactionContext, *auth.GetAuthTokenRequest) (*auth.GetAuthTokenResponse, error)
    21  	RevokeAuthTokenInTransaction(*txncontext.TransactionContext, *auth.RevokeAuthTokenRequest) (*auth.RevokeAuthTokenResponse, error)
    22  
    23  	CheckIsAuthorizedInTransaction(*txncontext.TransactionContext, *pfs.Repo, auth.Scope) error
    24  }
    25  
    26  // APIServer represents an auth api server
    27  type APIServer interface {
    28  	auth.APIServer
    29  	TransactionServer
    30  }