django_socio_grpc.management.commands.generate_proto_old_way

Module Contents

Classes

Command

API

class django_socio_grpc.management.commands.generate_proto_old_way.Command(stdout=None, stderr=None, no_color=False, force_color=False)

Bases: django.core.management.base.BaseCommand

help

‘Generates proto.’

add_arguments(parser)
handle(*args, **options)
check_or_write(file_path, proto)

Write the new generated proto to the corresponding file If option –check is used verify if the new content is identical to one already there

check_proto_generation(original_file, new_proto_content)

If option –check activated allow to verify that the new generated content is identical to the content of the actual file If not raise a ProtobufGenerationException

check_options()

Verify the user input

create_directory_if_not_exist(file_path)