github.com/juju/juju@v0.0.0-20240327075706-a90865de2538/api/controller/usersecretsdrain/client.go (about)

     1  // Copyright 2023 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package usersecretsdrain
     5  
     6  import (
     7  	"github.com/juju/juju/api/base"
     8  	commonsecretbackends "github.com/juju/juju/api/common/secretbackends"
     9  	commonsecretdrain "github.com/juju/juju/api/common/secretsdrain"
    10  )
    11  
    12  type backendsClient = commonsecretbackends.Client
    13  
    14  // Client is the api client for the UserSecretsDrain facade.
    15  type Client struct {
    16  	*commonsecretdrain.Client
    17  	*backendsClient
    18  }
    19  
    20  // NewClient creates a secrets api client.
    21  func NewClient(caller base.APICaller) *Client {
    22  	facade := base.NewFacadeCaller(caller, "UserSecretsDrain")
    23  	return &Client{
    24  		commonsecretdrain.NewClient(facade),
    25  		commonsecretbackends.NewClient(facade),
    26  	}
    27  }