Apply make fmt
This commit is contained in:
parent
d8eda81e0e
commit
3702fc3acb
11 changed files with 96 additions and 100 deletions
|
@ -64,7 +64,6 @@ func (p *ScaffoldingProvider) Resources(ctx context.Context) []func() resource.R
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (p *ScaffoldingProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
|
func (p *ScaffoldingProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
|
||||||
return []func() datasource.DataSource{
|
return []func() datasource.DataSource{
|
||||||
NewTorObfs4BridgeLineDataSource,
|
NewTorObfs4BridgeLineDataSource,
|
||||||
|
@ -72,8 +71,7 @@ func (p *ScaffoldingProvider) DataSources(ctx context.Context) []func() datasour
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ScaffoldingProvider) Functions(ctx context.Context) []func() function.Function {
|
func (p *ScaffoldingProvider) Functions(ctx context.Context) []func() function.Function {
|
||||||
return []func() function.Function{
|
return []func() function.Function{}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(version string) func() provider.Provider {
|
func New(version string) func() provider.Provider {
|
||||||
|
|
|
@ -39,17 +39,17 @@ type TorObfs4StateResource struct{}
|
||||||
|
|
||||||
// TorObfs4StateResourceModel describes the resource data model.
|
// TorObfs4StateResourceModel describes the resource data model.
|
||||||
type TorObfs4StateResourceModel struct {
|
type TorObfs4StateResourceModel struct {
|
||||||
Id types.String `tfsdk:"id"`
|
Id types.String `tfsdk:"id"`
|
||||||
RsaIdentityPrivateKey types.String `tfsdk:"rsa_identity_private_key"`
|
RsaIdentityPrivateKey types.String `tfsdk:"rsa_identity_private_key"`
|
||||||
Ed25519IdentityPrivateKey types.String `tfsdk:"ed25519_identity_private_key"`
|
Ed25519IdentityPrivateKey types.String `tfsdk:"ed25519_identity_private_key"`
|
||||||
NodeId types.String `tfsdk:"node_id"`
|
NodeId types.String `tfsdk:"node_id"`
|
||||||
PrivateKey types.String `tfsdk:"private_key"`
|
PrivateKey types.String `tfsdk:"private_key"`
|
||||||
PublicKey types.String `tfsdk:"public_key"`
|
PublicKey types.String `tfsdk:"public_key"`
|
||||||
DrbgSeed types.String `tfsdk:"drbg_seed"`
|
DrbgSeed types.String `tfsdk:"drbg_seed"`
|
||||||
IatMode types.Int64 `tfsdk:"iat_mode"`
|
IatMode types.Int64 `tfsdk:"iat_mode"`
|
||||||
Certificate types.String `tfsdk:"certificate"`
|
Certificate types.String `tfsdk:"certificate"`
|
||||||
StateJson types.String `tfsdk:"state_json"`
|
StateJson types.String `tfsdk:"state_json"`
|
||||||
BridgeLine types.String `tfsdk:"bridge_line"`
|
BridgeLine types.String `tfsdk:"bridge_line"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// obfs4StateJson represents the JSON structure for the state file
|
// obfs4StateJson represents the JSON structure for the state file
|
||||||
|
@ -260,7 +260,6 @@ func (r *TorObfs4StateResource) Delete(ctx context.Context, req resource.DeleteR
|
||||||
tflog.Trace(ctx, "deleted obfs4 state resource")
|
tflog.Trace(ctx, "deleted obfs4 state resource")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// generateObfs4State generates all the obfs4 state fields
|
// generateObfs4State generates all the obfs4 state fields
|
||||||
func (r *TorObfs4StateResource) generateObfs4State(ctx context.Context, data *TorObfs4StateResourceModel) error {
|
func (r *TorObfs4StateResource) generateObfs4State(ctx context.Context, data *TorObfs4StateResourceModel) error {
|
||||||
// Derive node ID from RSA identity key (required)
|
// Derive node ID from RSA identity key (required)
|
||||||
|
|
|
@ -444,7 +444,6 @@ func testTorObfs4StateResourcesAreDifferent(resource1, resource2 string) resourc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Helper functions for creating types.String and types.Int64 values in tests
|
// Helper functions for creating types.String and types.Int64 values in tests
|
||||||
func typeStringValue(value string) types.String {
|
func typeStringValue(value string) types.String {
|
||||||
return types.StringValue(value)
|
return types.StringValue(value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue